---
title: Process a document via API
slug: detected-apis/process-a-document-via-api
docTags: 
createdAt: 2026-09-17T20:29:11.103Z
---

# Overview

Often companies need to process documents they receive in other systems in Detected for things like fraud checks, translations or OCR.&#x20;

These are configured within case management and then can be easily called via API.

# General Flow

- Create a case to hold the required documents (or skip this if case already exists)
- Push the required documents to the case using the library id to trigger the right processing flows
- Wait for the webhook confirmation that the documents been processed
- Retrieve the full details of the processed document

# Integration View

```mermaid
---
config:
  theme: redux-dark
  look: classic
---
sequenceDiagram
  autonumber
  participant ClientBackend as Clients App
  participant DetectedApis as Detected APIs

  ClientBackend ->> DetectedApis: POST /profiles
  DetectedApis -->> ClientBackend: Profile references

  ClientBackend ->> DetectedApis: POST /profiles/{profile-id}/documents/{doc-library-id}
  DetectedApis -->> ClientBackend: 200 OK

  DetectedApis --) ClientBackend: Document processed webhook
  ClientBackend ->> DetectedApis: GET /profiles/{profile-id}/documents/{document-id}
  DetectedApis -->> ClientBackend: Document details
```



# Platform Setup Checklist

- [ ] Ensure documents have been created in the document library & processing steps selected (OCR, Fraud, Translate)
- [ ] Fetch the document IDs and store them in your application to use with each API call (using the [Retrieve document library types](docId\:gxRz2VM9MQshJd4ij76Ar) api)
- [ ] Configure the [Document Processing Webhook](docId\:i4npMbvhvuK_pQTZxrlhf)&#x20;

# Common Questions

| **Question**                                                | **Answer**                                                                                                                                             |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| What profile type should be used when i create the profile? | You can use any profile type, it doesn't impact the overall processing.                                                                                |
| How do i get the ids of the available document types        | Use the [Retrieve document library types](docId\:gxRz2VM9MQshJd4ij76Ar)  API to get the IDs of the different documents that are setup in the platform  |







