Fetch an Identity

`GET` request to `/identity/:id` to fetch an Identity that matches the provided `identity_id`.

GET to /identity/:id

Retrieves an Identity that matches the provided id.

GET https://api.intuition.systems/identity/:id
   await fetch(`${apiUrl}/identity/${id}`, {
      method: 'GET',
      "headers": {
        "Content-Type": "application/json",
        "x-api-key": <API_KEY>
      },
    })

Security

This request requires a valid API Key to be included with each request.

Headers

  • Content-Type: application/json

  • x-api-key: <API_Key>

Path Parameters

ParameterDescription

id

string - Required The identity_id for the Identity you want to fetch. Example: did:intuition:ipfs:Qxxx

Response

If an Identity is found for the id you'll receive back an Identity object.

{
  "id": "f9xxxxxx...",
  "identity_id": "did:intuition:ipfs:Xxx",
  "identity_hash": "x...",
  "display_name": "JP",
  "description": "It's me, JP",
  "image": "image_url",
  "creator": {
      "id": "7xxxxxxx...",
      "created_at": "2024-02-13T14:58:43.809055Z",
      "updated_at": "2024-02-13T14:58:43.809055Z",
      "last_login": "2024-02-21T18:47:26.556035Z",
      "api_key": "",
      "wallet": "0x...",
      "role": "User"
  },
  "status": "complete",
  "created_at": "2024-02-15T05:47:17.289011Z",
  "num_positions": 0,
  "updated_at": "2024-02-15T05:47:17.289011Z",
  "vault_id": "1",
  "assets_sum": "0",
  "conviction_sum": "0",
  "conviction_price": "0"
},

Here is an example Zod schema and TypeScript interface you can use for the Identity:

export const IdentitySchema = z.object({
  identity_id: z.string(),
  vault_id: z.string(),
  display_name: z.string(),
  description: z.string().optional(),
  image: z.string().optional(),
  corpora_id: z.string().nullish(),
  semantic: z.string().nullish(),
  external_reference: z.string().nullish(),
  creator: EmbedUserUserAggregatesSchema.optional(),
  created_at: z.string(),
  num_positions: z.number(),
  assets_sum: z.string(), // bigint
  conviction_sum: z.string(), // bigint
  conviction_price: z.string(), // bigint
  updated_at: z.string(),
  status: z.string().optional(),
  isUser: z.boolean().optional(),
  user_conviction: z.string().optional(), // bigint
  user_conviction_value: z.string().optional(), // bigint
})

Response Codes

CodeDescription

200

Identity object that matches the provided id

404

No Identity found for the provided id

Last updated