REST API · lines

POST /lines/{lineKey}/endpoints/dry-run

Validate an endpoint document without writing it. Pass `id` in the URL to dry-run a PATCH against an existing endpoint; omit it to dry-run a create. Returns {ok: true, resolved} or {ok: false, errors}.

A `sample` in the body also evaluates every target's `outgoingMapping` against it, and `answerSample` does the same for `answerMapping`, attaching what each produced, which node produced each field, and every rule that failed with the value that broke it. The payload never reaches a vendor — it is handed to the mapping service, evaluated, and discarded.

post_api_endpoints_dry_run

Authentication

  • Bearer

Parameters

NameInRequiredSchemaDescription
lineKey path yes {"type":"string"}

Request body

A target may name its URL as `targetUrl` or, as the draft read returns it, `targetURL`; both present and different is a 422 naming both fields.

application/json · required

{
    "name": "Lifecycle webhook",
    "url": "/lifecycle",
    "httpMethod": "POST",
    "mock": true,
    "mockResponse": {
        "statusCode": 200,
        "contentType": "application/json",
        "body": "{\"version\":\"stable\"}"
    },
    "attributes": [],
    "targets": []
}

Responses

200

The document is valid; the resolved endpoint is returned (never written).

application/json

{
    "ok": true,
    "resolved": {
        "project": "support-desk-482913",
        "line": "v1",
        "name": "Lifecycle webhook",
        "url": "/lifecycle",
        "httpMethod": "POST",
        "strict": false,
        "attributes": [],
        "targets": [],
        "mock": true,
        "mockResponse": {
            "statusCode": 200,
            "contentType": "application/json",
            "body": "{\"version\":\"stable\"}"
        }
    }
}

422

The document failed validation.

application/json

{
    "ok": false,
    "errors": {
        "url": "A URL is required."
    }
}

404

No line with this key in the project.

application/json

{
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "description": "Machine-readable error code, e.g. \"not_found\", \"forbidden\", \"validation\".",
            "type": "string",
            "enum": [
                "bad_request",
                "unauthorized",
                "insufficient_credits",
                "forbidden",
                "web_only",
                "allowlist_widens",
                "not_found",
                "conflict",
                "draft_revision_conflict",
                "rollback_confirmation_conflict",
                "not_replayable",
                "targets_outside_allowlist",
                "gone",
                "deprecated_operation",
                "validation",
                "rate_limited",
                "payment_provider",
                "verification_unavailable",
                "analytics_unavailable",
                "credential_vault_unavailable",
                "notification_grants_unavailable"
            ]
        },
        "message": {
            "description": "Human-readable explanation of what went wrong. Absent on a field-level validation failure, where `fields` carries the detail instead.",
            "type": "string"
        },
        "object": {
            "description": "The resource the error concerns, when there is one.",
            "required": [
                "type",
                "id"
            ],
            "properties": {
                "type": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "action": {
            "description": "What to do next, naming the call or the panel page that does it. Absent when there is no corrective step.",
            "type": "string"
        },
        "fields": {
            "description": "Present when `error` is \"validation\" — one message per rejected field, keyed by the field name.",
            "type": "object",
            "additionalProperties": {
                "type": "string"
            }
        },
        "retry_after": {
            "description": "An RFC 3339 timestamp, the moment the request may be retried. Not every `rate_limited` refusal carries one.",
            "type": "string",
            "format": "date-time"
        }
    },
    "type": "object"
}

← REST API reference