Skip to main content
Every object in the Deck API has a unique identifier with a type prefix. The prefix tells you what kind of resource the ID refers to, making it easier to debug, log, and route objects through your system without additional lookups.

Format

All IDs follow the same pattern:
{type_prefix}_{unique_string}
The prefix is always lowercase, followed by an underscore, followed by a URL-safe alphanumeric string. IDs are case-sensitive.

ID Reference

PrefixResourceExampleDescription
agt_Agentagt_a1b2c3d4An automation agent scoped to a use case.
src_Sourcesrc_a1b2c3d4A website or service your agent connects to.
conn_Connectionconn_a1b2c3d4An authenticated session between a user and a source.
task_Tasktask_abc123A defined action an agent can perform.
trun_Task Runtrun_a1b2c3d4A single execution of a task.
stor_Storage Itemstor_a1b2c3d4A file or document captured during a task run.
wflo_Workflowwflo_abc123A multi-step orchestration of tasks.
wrun_Workflow Runwrun_abc123A single execution of a workflow.
evt_Eventevt_a1b2c3d4A lifecycle event emitted by the platform.
evtd_Event Destinationevtd_a1b2c3d4An endpoint that receives events.
edlv_Event Deliveryedlv_a1b2c3d4A record of an event sent to a destination.
req_Requestreq_a1b2c3d4A unique identifier for an API request, returned in error responses.
sk_live_API Keysk_live_abc123...Your API key. Not a resource ID, but follows the same prefix convention.

Using prefixed IDs

Type checking

Because the prefix encodes the resource type, you can validate IDs before making API calls.
function getResourceType(id) {
  const prefix = id.split("_").slice(0, -1).join("_");
  const types = {
    agt: "agent",
    src: "source",
    conn: "connection",
    task: "task",
    trun: "task_run",
    stor: "storage_item",
    wflo: "workflow",
    wrun: "workflow_run",
    evt: "event",
    evtd: "event_destination",
    edlv: "event_delivery",
  };
  return types[prefix] || null;
}

Logging and debugging

Prefixed IDs make it easy to trace activity across resources in your logs. A log entry containing conn_a1b2c3d4 and trun_x9y8z7 immediately tells you which connection and task run were involved, without needing to cross-reference separate tables.

Cross-referencing resources

Many API responses include related resource IDs. A task run object, for example, includes task_id, connection_id, agent_id, and source_id. The prefixes let you quickly verify the relationships are correct.
{
  "id": "trun_a1b2c3d4",
  "object": "task_run",
  "task_id": "task_abc123",
  "connection_id": "conn_a1b2c3d4",
  "agent_id": "agt_a1b2c3d4",
  "source_id": "src_a1b2c3d4",
  "status": "completed"
}

Notes

  • IDs are immutable. Once assigned, they never change.
  • IDs are globally unique. You will never see the same ID across different resource types or organizations.
  • IDs are case-sensitive. agt_A1B2 and agt_a1b2 are different identifiers.
  • Passing an ID with the wrong prefix to an endpoint returns a 400 validation error.