Process a file with AI
Ask Wafeq's AI to process this file: it reads the file and books what it is, such as a draft bill or expense, then links the records to the file. The request returns 202 with the file at status queued; follow the status field to processed or failed, and read the booked records with ?expand=entities. A file can be processed again only after a run that booked nothing (failed with no linked record from that run). With an API key the AI acts as the organization's owner (or an admin); with an OAuth token it acts as the member who granted the token, with that member's permissions, and the token needs both the bills.write and expenses.write scopes. Files that arrived in the inbox are processed there and are refused here.
Updated about 19 hours ago