Skip to navigation

Create spans in bulk

Accepts up to 500 spans per request. Each item in logs uses the fields in Create a span. Rows are processed independently. A 201 Created response means at least one row was accepted, so check error_count and errors for partial failures. success_count counts rows that passed synchronous validation and were accepted for ingestion.

Rate limit: 30 requests per minute per organization for API-key calls, shared across the organization’s keys. For JWT calls, the limit is per user. Metadata keys beginning with _ are reserved for platform use and omitted from span and trace read responses.

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

OR
AuthorizationBearer

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

Request

This endpoint expects an object.
logslist of objectsRequired

Non-empty array of span payloads. Each object uses the same schema as POST /api/request-logs/.

Response

At least one row was accepted. This status is also used for partial success; inspect the response counts and indexed errors.

success_countinteger>=0
Number of items successfully processed.
error_countinteger>=0
Number of items that failed.
errorslist of objects

Item-level failures, keyed by zero-based input index.

Errors

400
Bad Request Error
403
Forbidden Error
422
Unprocessable Entity Error
429
Too Many Requests Error