---
updatedAt: 2026-09-10T06:16:17.000Z
agentTools:
  projectIndex: https://developer.vouchfor.com/llms.txt
---

# Update Advocacy Request Metrics

Record engagement metrics against an advocacy request

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Vouch",
    "description": "test",
    "termsOfService": "https://vouchfor.com/terms",
    "contact": {
      "name": "Vouch API Support",
      "email": "support@vouchfor.com"
    },
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{environment}.vouchfor.com/v1",
      "variables": {
        "environment": {
          "default": "api",
          "enum": [
            "api",
            "api-staging"
          ]
        }
      }
    },
    {
      "url": "https://{environment}.vouchfor.com/v1/entities/{entityId}",
      "variables": {
        "environment": {
          "default": "api",
          "enum": [
            "api",
            "api-staging"
          ]
        },
        "entityId": {
          "default": "demo",
          "description": "Entity ID"
        }
      }
    }
  ],
  "components": {
    "parameters": {
      "Id": {
        "name": "id",
        "in": "path",
        "description": "Resource id - can be id or external id",
        "required": true,
        "allowEmptyValue": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "requestBodies": {
      "UpdateRequestMetrics": {
        "description": "Update Advocacy Request Metrics",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "request": {
                  "type": "object",
                  "properties": {
                    "metrics": {
                      "$ref": "#/components/schemas/EngagementMetrics"
                    },
                    "reactions": {
                      "type": "object",
                      "description": "Reaction counts keyed by reaction type",
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  }
                }
              },
              "required": [
                "request"
              ]
            }
          }
        }
      }
    },
    "responses": {
      "AdvocacyRequest": {
        "description": "Advocacy Request",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "account": {
                  "$ref": "#/components/schemas/Account"
                },
                "entity": {
                  "$ref": "#/components/schemas/Entity"
                },
                "request": {
                  "$ref": "#/components/schemas/AdvocacyRequest"
                }
              }
            }
          }
        }
      },
      "BadRequestError": {
        "description": "Request content is invalid",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Bad Request."
            }
          }
        }
      },
      "NotFoundError": {
        "description": "The requested resource is not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Not Found."
            }
          }
        }
      },
      "UnauthorizedError": {
        "description": "Invalid API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Unauthorized."
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Internal Server Error."
            }
          }
        }
      }
    },
    "schemas": {
      "Account": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "example": "david@vouchfor.com"
          },
          "name": {
            "type": "string",
            "example": "David Stirk"
          }
        }
      },
      "AdvocacyRequest": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "externalid": {
                "type": "string",
                "minLength": 1,
                "maxLength": 50,
                "example": "my-application-id"
              },
              "createddate": {
                "type": "string",
                "format": "date-time",
                "readOnly": true,
                "example": "2021-01-01T12:00:00.000Z"
              },
              "updateddate": {
                "type": "string",
                "format": "date-time",
                "readOnly": true,
                "example": "2022-01-01T12:00:00.000Z"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "readOnly": true,
                "example": "rrrrrrrrrr"
              },
              "status": {
                "type": "string",
                "readOnly": true,
                "example": "LIVE"
              },
              "post": {
                "type": "object",
                "description": "Present on POST type requests",
                "properties": {
                  "message": {
                    "type": "string"
                  },
                  "post": {
                    "type": "string"
                  },
                  "vouchId": {
                    "type": "string",
                    "example": "vvvvvvvvvv"
                  },
                  "fileId": {
                    "type": "string"
                  }
                }
              },
              "boost": {
                "type": "object",
                "description": "Present on BOOST type requests",
                "properties": {
                  "message": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              },
              "settings": {
                "type": "object",
                "properties": {
                  "lockCaption": {
                    "type": "boolean"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "tags": {
                "type": "array",
                "readOnly": true,
                "items": {
                  "type": "string"
                }
              },
              "counts": {
                "type": "object",
                "readOnly": true,
                "description": "Campaign activity rollup",
                "properties": {
                  "shares": {
                    "type": "integer"
                  },
                  "reactions": {
                    "type": "integer"
                  },
                  "reposts": {
                    "type": "integer"
                  },
                  "reach": {
                    "type": "integer"
                  }
                }
              },
              "metrics": {
                "$ref": "#/components/schemas/EngagementMetrics"
              },
              "reactions": {
                "type": "integer",
                "readOnly": true
              },
              "admin": {
                "type": "string",
                "format": "uri",
                "readOnly": true
              }
            }
          }
        ]
      },
      "EngagementMetrics": {
        "type": "object",
        "description": "LinkedIn engagement metrics",
        "properties": {
          "impressions": {
            "type": "integer",
            "minimum": 0,
            "example": 100
          },
          "reach": {
            "type": "integer",
            "minimum": 0,
            "example": 80
          },
          "reshares": {
            "type": "integer",
            "minimum": 0,
            "example": 5
          },
          "reactions": {
            "type": "integer",
            "minimum": 0,
            "example": 20
          },
          "comments": {
            "type": "integer",
            "minimum": 0,
            "example": 3
          }
        }
      },
      "Entity": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "externalid": {
                "type": "string",
                "minLength": 1,
                "maxLength": 50,
                "example": "my-application-id"
              },
              "createddate": {
                "type": "string",
                "format": "date-time",
                "readOnly": true,
                "example": "2021-01-01T12:00:00.000Z"
              },
              "updateddate": {
                "type": "string",
                "format": "date-time",
                "readOnly": true,
                "example": "2022-01-01T12:00:00.000Z"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "note": {
                "$ref": "#/components/schemas/Note"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "readOnly": true,
                "example": "eeeeeeeeee"
              },
              "name": {
                "type": "string",
                "example": "Vouch"
              },
              "logo": {
                "type": "string",
                "format": "uri",
                "example": "https://img.logo.dev/vouchfor.com?token=pk_XzHPPDjZTBikQbIi3iLD0A&size=260"
              },
              "url": {
                "type": "string",
                "format": "uri",
                "example": "https://vouchfor.com"
              }
            }
          }
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "Note": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "example": "thanks for Vouching for us!"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Advocacy"
    }
  ],
  "paths": {
    "/advocacy/requests/{id}/metrics": {
      "post": {
        "summary": "Update Advocacy Request Metrics",
        "description": "Record engagement metrics against an advocacy request",
        "tags": [
          "Advocacy"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/UpdateRequestMetrics"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AdvocacyRequest"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  }
}
```