> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neoagent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Pia API

> Run your Pia automations from Neo agents, follow each run, and read or change Pia clients, agents and automations

The common use is a ticket that asks for something a Pia automation does: the agent reads the ticket, finds the Pia automation published for that client, runs it on the ticket with the inputs the ticket gives, and writes how the run went on the ticket.

<Info>
  Automatically enabled when you configure Pia permissions in your agent workflow.
</Info>

## What it does

* List the Tech Assist and SmartForm automations published for a client, by its company in your PSA
* Run an automation on a PSA ticket, a PSA company or a Pia client, with the automation's inputs
* Read a run's status (finished, failed, waiting or cancelled) and its activity logs, step by step
* Read Pia clients with their PSA company id, and add or remove their tags
* Read Pia agents on your clients' devices, and activate, deactivate or uninstall one
* Read and change extension automations, delegated Microsoft consent, and the automation source in Pia Source
* Read the services Pia is connected to

Pia has no ticket API: Pia works on tickets in your PSA through its own PSA connection. The agent reads the ticket with its PSA tools, as for any ticket, and uses Pia to run the automation and read its result.

## Permission groups

| Group | Covers |
| - | - |
| Automations | Find automations, run one, and read each run's status and logs |
| Pia Agents | Pia agents on devices, their versions and tags; activate, deactivate, uninstall |
| Clients & Tags | Pia clients and their tags |
| Delegated Consent | Each client's delegated Microsoft consent; create a consent request or replace one |
| Extension Automations | Extension automations, extension points, and which run at each point |
| Connected Services | The services Pia is connected to and their per-client settings. Read only |
| Automation Source | Pia Source repositories; export, import and repository settings |

| Profile | What it does |
| - | - |
| Read Only | Reads every group, runs and changes nothing |
| Helpdesk | Reads every group. Running an automation asks a technician first |
| IT Admin | Runs automations and changes agents, clients and extensions on its own. Delegated consent and source changes ask first |
| Full Automation | Runs automations and makes changes on its own; only the actions under Safety Controls ask |

## Safety Controls

These always ask a technician, whatever the profile:

* Uninstalling a Pia agent from a device
* Replacing a client's delegated consent, which stops the old consent until the client's admin consents again
* A source import that deletes a package, or whose content Neo cannot read as one that does not

Neo does not download the Pia agent installer, a file an agent cannot read. Neo removes credential values from what Pia returns: the per-client settings of connected services, and any variable or field whose name contains `password`, `pwd`, `passphrase`, `secret` or `credential`, names an API, access, refresh, auth, bearer or session token (as Pia's built-in `MSGRAPH_Api_Token_Client` does), or ends in `key` or `token`. A change that sends one of those removed values back is refused. Activity logs are the automation's own output and come back as Pia wrote them, so agents are told never to copy a password or code from a log into a ticket or chat.

## Setup

See [Connecting Pia to Neo](/integrations/pia/connecting-to-neo).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.