<!--
{
  "documentType" : "article",
  "framework" : "IdentityLookup",
  "identifier" : "/documentation/IdentityLookup/formatting-data-for-blocking-and-identity-information",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Formatting data for blocking and identity information"
}
-->

# Formatting data for blocking and identity information

Set up your PIR payload for call blocking and identity information.

## Discussion

With Live Caller ID Lookup, when a device receives an incoming call, the system reaches out to a third-party service to fetch private information retrieval (PIR) data from your server. You need to format that data so the system can make the following requests:

- A blocking information request
- An identity information request

For more information, see the [Swift homomorphic encryption library](https://github.com/apple/swift-homomorphic-encryption).

### Block a caller

The blocking information request is a single byte with two defined values:

- 0: This value means don’t block the caller.
- 1: This value means block the caller.

### Identify caller information

The identity request displays caller information on the device. This information is a serialized protocol buffer message of type `CallIdentity`. The following example shows the response formatting for an identity request:

```c
syntax = "proto3";

// The image format.
enum ImageFormat {
  // The unspecified format.
  IMAGE_FORMAT_UNSPECIFIED = 0;
  // The High Efficiency Image File Format (HEIF/HEIC).
  IMAGE_FORMAT_HEIC = 1;
}

// The identity category.
// The system might show identity information differently based on the category. 
enum IdentityCategory {
  IDENTITY_CATEGORY_UNSPECIFIED = 0;
  IDENTITY_CATEGORY_PERSON = 1;
  IDENTITY_CATEGORY_BUSINESS = 2;
}

// The icon.
message Icon {
  // The image format for the icon.
  ImageFormat format = 1;
  // The encoded image in the specified format.
  bytes image = 2;
}

// The caller identity.
message CallIdentity {
  // The identity information.
  string name = 1;
  // The icon that displays the identity.
  Icon icon = 2;
  // The cache expiration in minutes.
  // The system reuses this response for the specified minutes before requesting it again.
  uint32 cache_expiry_minutes = 3;
  // The identity category.
  IdentityCategory category = 4;
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)