API Reference
Log In
API Reference

Attribute session to ticket

Record a point-in-time attribution between a coding-assistant session and a ticket. A different ticket opens a new time interval; re-posting the same ticket as the current interval (without effectiveFrom) changes nothing. Sending an effectiveFrom that matches an existing interval updates that interval; the latest write wins.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Opaque identifier for the coding-assistant session (e.g. Claude Code session UUID).

Query Params
string

ID of the team that owns this data. Optional when you use a metering API key: the team then comes from the key, and a value naming a different team is rejected. Required with a full-access API key or a signed-in session.

Body Params

Session → ticket attribution payload

Session → ticket attribution payload

string | null
string | null

Human-readable ticket title, ≤ 500 characters. Omit to leave the stored title unchanged; send explicit null to clear it.

string | null

Free-text detail for this attribution, ≤ 500 characters. Omit to leave the stored reason unchanged; send explicit null to clear it.

string | null

Opt-out reason category: one stable kebab-case id from the list (peer-review, incident-response, customer-support, tooling-and-upkeep, discovery-and-research, planning-and-scoping, business-operations, legal-and-compliance, content-and-communications, admin-and-coordination, documentation, learning-and-onboarding, personal, restricted, other). Aliases and loose spellings are matched. The list is fixed: any value it does not carry (prose, or a slug like 'sprint-cleanup') is recorded as category 'other' with your text kept as the detail. An explicit 'uncategorized' is recorded as 'other', since you sent a value. An unrecognized value is never rejected: it is recorded as other, with your text kept as the detail, so the rest of the attribution is still saved. Omit the field and the stored category is left alone; send explicit null to reset it to 'uncategorized' (nobody was asked). On a brand-new interval an omitted category is 'uncategorized' too, unless the free-text reason sent alongside it is itself a single token naming a category, which is used.

string | null

How this session's work is being performed: 'interactive-coding' (a person at the keyboard) or 'autonomous-coding' (an agent). Matched case-insensitively. The list of values is closed, and an unrecognized value is never rejected: it is treated as though the field were omitted, so the rest of the attribution is still saved. This is a declaration, not a hint: Revenium never infers a mode, so omitting it leaves the session's usage reported as Unclassified unless the usage records themselves carry an OTEL revenium.trace.type. A mode declared on a usage record always wins over this one. Omit the field, or send an unrecognized value, to leave the stored value unchanged; send explicit null to clear it. On a brand-new interval there is no previous value to inherit, so an omitted or unrecognized field is null on that interval too. To carry a work mode forward, send it on every POST that might open a new interval.

string | null
enum

Source coding assistant. Omit to leave the stored source unchanged; a brand-new interval with no source recorded defaults to 'other'.

Allowed:
string | null

Email of the subscriber/developer running the session, ≤ 255 characters. The first valid identity is retained across the session. Omission or null does not clear it; later assertions are validated but do not replace an established identity.

string | null

Repository name or URL, ≤ 255 characters. Omit to leave the stored value unchanged; send explicit null to clear it.

string | null

Branch name, ≤ 255 characters. Omit to leave the stored value unchanged; send explicit null to clear it.

date-time | null
splits
array of objects | null

Split the session across 1 to 10 tickets by weight. Send either splits or ticketId, not both. Weights are scaled to sum to 1.0 (tolerance 0.01). Only cost Revenium can reassign is split; usage you already attributed to a customer stays where it is. Omit the field to keep a stored split; sending a ticketId that is not the split's parent ticket switches to single-ticket attribution and clears it. Send null to clear it.

splits
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/hal+json
*/*