REST API · lines

GET /lines/{lineKey}/endpoint-template

Returns a canonical minimal-valid endpoint JSON for a fresh line — agents can POST it verbatim to the create route and get an immediately-working mock endpoint.

get_api_endpoint_template

Authentication

  • Bearer

Parameters

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

Responses

200

A canonical minimal-valid endpoint document, ready to POST verbatim.

application/json

{
    "lineKey": "v1",
    "endpoint": {
        "name": "New endpoint",
        "url": "/example",
        "httpMethod": "POST",
        "strict": false,
        "rateLimit": null,
        "allowedIPs": [],
        "transformers": null,
        "idempotencyEnabled": true,
        "mock": true,
        "mockResponse": {
            "statusCode": 200,
            "contentType": "application/json",
            "body": "{\"status\":\"ok\"}"
        },
        "attributes": [
            {
                "name": "example_field",
                "in": "body",
                "attributeType": "string",
                "required": false,
                "defaultValue": "",
                "validators": [],
                "params": [],
                "logging": "loggable",
                "description": "Example attribute. Remove or replace before going live."
            }
        ],
        "targets": [
            {
                "name": "Example backend",
                "targetUrl": "https://example.invalid/webhook",
                "auth": {
                    "type": "none"
                },
                "mapping": [],
                "deliveryMode": "async",
                "retryPolicy": {
                    "maxAttempts": 14,
                    "backoffMultiplier": 2,
                    "retryOn": [
                        429,
                        500,
                        502,
                        503,
                        504
                    ]
                }
            }
        ]
    }
}

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