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:
The prefix is always lowercase, followed by an underscore and a unique, case-sensitive string. Treat the full identifier as opaque: match on the prefix to determine the resource type, but don’t parse or depend on the format of the random portion, which may change.

ID Reference

Using prefixed IDs

Type checking

Because the prefix encodes the resource type, you can validate IDs before making API calls.

Logging and debugging

Prefixed IDs make it easy to trace activity across resources in your logs. A log entry containing cred_a1b2c3d4 and trun_x9y8z7 immediately tells you which credential 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, credential_id, agent_id, and source_id. The prefixes let you quickly verify the relationships are correct.

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.