PostliftDevelopers
Documentation menu
Jev evaluations

Evaluate user-supplied questions (cannot approve voice settings)

Use this endpoint from your own integration, with the same account permissions and safeguards as the app.

Scope · jev:writeIdempotency-Key required10 expensive operations / minute / user

Request

POST/api/v1/jev/evaluate
Example requestcURL
curl -X POST 'https://postlift.io/api/v1/jev/evaluate' \
  -H "Authorization: Bearer $POSTLIFT_API_KEY" \
  -H 'Idempotency-Key: integration-operation-0001' \
  -H 'Content-Type: application/json' \
  --data '{
  "state": {
    "text": "A small release beats a perfect plan."
  },
  "questions": {
    "clear": {
      "type": "boolean",
      "instructions": "Does this post communicate a clear idea?"
    }
  }
}'

Replace path placeholders with your Postlift resource IDs. Example timestamps must be replaced with a future time; preserve the same timestamp when retrying the same operation.

Parameters

NameLocationDescription
Idempotency-KeyrequiredheaderUnique operation key. Reuse only for the same payload/account. See retry semantics in the guide.Pattern: ^[A-Za-z0-9_-]{8,128}$.

Request body

Send JSON with Content-Type: application/json.

FieldType & constraints
staterequiredstring | object | post_jev_evaluate_Request ↗ []
questionsrequiredobject
View JSON schema
{
  "type": "object",
  "properties": {
    "state": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/components/schemas/post_jev_evaluate_Request/$defs/__schema0"
          }
        },
        {
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/post_jev_evaluate_Request/$defs/__schema1"
          }
        }
      ]
    },
    "questions": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"
      },
      "additionalProperties": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "boolean"
              },
              "instructions": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "criteria": {
                "type": "object",
                "properties": {
                  "true": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "false": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                },
                "required": [
                  "true",
                  "false"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "type",
              "instructions"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "choice"
              },
              "instructions": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "criteria": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"
                },
                "additionalProperties": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                }
              }
            },
            "required": [
              "type",
              "instructions",
              "criteria"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "score"
              },
              "instructions": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "criteria": {
                "minItems": 2,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                }
              }
            },
            "required": [
              "type",
              "instructions",
              "criteria"
            ],
            "additionalProperties": false
          }
        ]
      }
    }
  },
  "required": [
    "state",
    "questions"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/post_jev_evaluate_Request/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/components/schemas/post_jev_evaluate_Request/$defs/__schema0"
          }
        }
      ]
    },
    "__schema1": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/post_jev_evaluate_Request/$defs/__schema1"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/components/schemas/post_jev_evaluate_Request/$defs/__schema1"
          }
        }
      ]
    }
  }
}

Response

200 Successful operation.

FieldType & constraints
requestIdrequiredstring
modelrequiredstring
resolvedModelrequiredstring
answersrequiredobject
usagerequiredobject
Explore JevEvaluation ↗
View JSON schema
{
  "type": "object",
  "properties": {
    "requestId": {
      "type": "string"
    },
    "model": {
      "type": "string"
    },
    "resolvedModel": {
      "type": "string"
    },
    "answers": {
      "type": "object",
      "additionalProperties": true
    },
    "usage": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "required": [
    "requestId",
    "model",
    "resolvedModel",
    "answers",
    "usage"
  ],
  "additionalProperties": true
}

Errors & retries

Failures use a stable error code and request ID. Check the current resource version or request status before retrying a write.

StatusMeaning
400Invalid input or Jev rejection
401Invalid, expired or revoked API key
402Plan, publishing quota or AI credit requirement
403Missing scope
404Resource not found or not owned
409Version conflict, missing voice or duplicate AI operation
413Payload too large
429Rate or concurrency limit
500Internal error
502Upstream failure; inspect operation status
503Service or review unavailable
Read the retry guide ↗