---
title: "iOS SDK: Ticket attributes"
description: "Set and clear ticket attribute values with the Gleap iOS SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/447-ios-sdk-ticket-attributes
collection: "iOS"
updated: 2026-11-01
language: en
---

# iOS SDK: Ticket attributes

Set and clear ticket attribute values with the Gleap iOS SDK. Follow the integration code examples.

## Set ticket attributes

Ticket attributes can be set with the method below. If the user also provides data for an attribute (for example `description`), the user input will be prioritized.

```javascript
Gleap.setTicketAttributeWithKey("notes", value: "This is a test value.")
```

**First param**: attribute key  
**Second param**: value (string, boolean, string array or number are supported)

Ticket attribute data will not be [pre-filled](https://gleap-developer-docs.gleap.help/en/articles/459-ios-sdk-prefill-the-widget-form) in forms.

## Finding the ticket attribute keys

You can find or create all available ticket attributes for each ticket type in **Settings → Inbox & tickets → Data attributes**.

![Current ticket attributes and Field ID column in the Pied Piper demo project.](https://staticfiles.gleap.io/p613b5dd730aed737108f87ab/0BfQwIf0vwqGcjqKp2pDJs2Wct5xgcwVKlLmBiX5jzmoMQ19JQ9l5ideimrvht7xbFbV7UzNJRC.png)

## Unset ticket attributes

Ticket attributes can be unset with the method below.

```javascript
Gleap.unsetTicketAttribute(withKey: "notes")
```

## Clear all ticket attributes

All ticket attributes can be cleared with the method below.

```javascript
Gleap.clearTicketAttributes();
```

## Related

- [iOS SDK setup](https://docs.gleap.ai/en/articles/434-ios-sdk-setup.md)
- [iOS SDK: User identity](https://docs.gleap.ai/en/articles/435-ios-sdk-user-identity.md)
- [iOS SDK: Callbacks](https://docs.gleap.ai/en/articles/436-ios-sdk-callbacks.md)
- [iOS SDK: Frontend tools](https://docs.gleap.ai/en/articles/437-ios-sdk-frontend-tools.md)
- [iOS SDK: Forms](https://docs.gleap.ai/en/articles/438-ios-sdk-forms.md)
