Skip to content
Last updated

Authentication & authorization

Product API access is role-based. Each API key is provisioned with one or more roles in the Firm Portal. If your key lacks the role an endpoint requires, the request returns 403 Forbidden; if it carries no valid token at all, it returns 401 Unauthorized. See Errors for the exact response shapes.

Each endpoint page states its requirement in a Required role line at the top of its description.

The base role

Every key holds API_ADMIN; a key without it can't get a token. API_ADMIN covers:

  • Every read under /gql/v1/, such as clients, engagements, projects, invoices, and payments.
  • The /api/v1/ endpoints whose page lists it, such as reading files and creating or updating staff.

Every other /api/v1/ endpoint needs the role its page lists, so request the roles for the endpoints your integration calls.

Roles

The Firm Portal name is what a firm admin sees when issuing or editing a key.

RoleFirm Portal nameGrants
API_ADMINAPI AdminThe base role. See The base role.
CLIENT_CManage ClientsOnboard new clients, creating the client and its contacts.
ENG_CManage EngagementsCreate engagement letters, one at a time or in batches, update engagements, and read the status of batch creations.
PROJ_CManage ProjectsCreate projects from project templates, and assign staff to or remove staff from projects.
INVC_RView InvoicesRead a client's unpaid invoices.
PAYLNK_CCreate Payment LinksCreate single-use quick payment links for clients.
RECD_RView RecordsRead the available record types and their field schemas, but not the records themselves.
RECD_CManage RecordsCreate, update, and inactivate records, including clients, contacts, projects, staff, tasks, and custom records, through /api/v1/records. Upsert contacts. Read record types and their field schemas.
CUSTYP_RView Custom TypesRead custom record type definitions.
CUSTYP_CManage Custom TypesCreate, update, deactivate, and read custom record type definitions.
TM_CODE_RView Time CodesLook up time, expense, operational, and PTO codes and their field schemas.
TM_CODE_CManage Time CodesCreate and update time, expense, operational, and PTO codes, and look them up.
TM_ENTRY_RView Time EntriesLook up time, expense, operational, and PTO entries and their field schemas.
TM_ENTRY_CManage Time EntriesCreate and update time, expense, operational, and PTO entries, and look them up.
STF_TYP_RView Staff TypesLook up staff types.
STF_TYP_CManage Staff TypesCreate staff types in batches, and look them up.
EVNT_SUBEvent SubscriptionsCreate, update, deactivate, and reactivate webhook event subscriptions, and read them, their delivery history, and the webhook signing secret.
PYMT_EVNT_ALLAll Payment EventsLet payment event subscriptions receive every payment in the firm (the allPayments and paymentLinkOnly filters), not only payments through the key's own links. Use with EVNT_SUB.
WEBHK_TSTWebhook TestingGenerate and validate signed test webhook payloads.
FILE_RView FilesGet a signed download URL from GET /api/v1/files/{id} with includeDownloadUrl=true. Keys issued in the Firm Portal need it for that; other keys don't.
API_USRAPI AccessNo endpoint in this reference requires it. Reads use the base role.

Some roles, such as FILE_C (creating file upload URLs and linking files) and SUPER_ADMIN (managing staff role assignments), aren't offered in the Firm Portal. Ask your Aiwyn contact if you need one.

Endpoints that also accept API_ADMIN

Two /api/v1/ endpoints accept API_ADMIN as an alternative to their own role, and their Required role line lists both:

  • Listing a client's unpaid invoices: INVC_R or API_ADMIN.
  • Creating a quick payment link: PAYLNK_C or API_ADMIN.