---
title: "Workday Document Intelligence Base64, Resume & Opt-In Guide"
description: "How to call Workday AI Gateway Document Intelligence REST APIs (/ml/docint/v1/ids and /resume), convert Base64 to binary, and fix Extend IS not Opted in errors."
url: https://kiweely.com/guides/workday-document-intelligence-base64-binary-opt-in-errors
---

# AI Gateway Document Intelligence (/ml/docint/v1/ids): Converting Workday Drive Base64 to Binary, Resume Layout Pitfalls, and Fixing Opt-In Errors

Workday’s Document Intelligence REST APIs (/ml/docint/v1/ids, /doc, and /resume) require raw binary payloads (up to 20 MB) rather than Base64 strings. Learn how to decode Workday Drive Base64 payloads with an explicit MIME type in Orchestrate, handle multi-column resumes, and fix opt-in errors.

-   **Checked** against Workday on November 6
-   Applies to **Workday Extend**
-   5 min read
-   Published November 6
-   By Kiweely

## Why Document Intelligence calls fail on Base64 inputs or tenant opt-in checks

Workday AI Gateway exposes the **Document Intelligence REST APIs** under `https://api.workday.com/ml/docint/v1` (or regional gateways such as `https://api.us.wcp.workday.com/ml/docint/v1`), including:

-   **Identification Documents:** `POST /ml/docint/v1/ids?document_type=passport|us_passport|us_drivers_license` (accepts `JPG`, `PDF`, `PNG`)
-   **Document Scan:** `POST /ml/docint/v1/doc` (accepts `JPG`, `JPEG`, `PDF`, `PNG`)
-   **Resume Parsing:** `POST /ml/docint/v1/resume` (accepts `DOCX` and text-based `PDF`)
-   **Contracts, Financial Documents, and Receipts:** `POST /ml/docint/v1/contracts`, `/financials`, and `/receipt`

Every Document Intelligence endpoint requires a **raw binary** file stream (`data-binary`, up to 20 MB) in the HTTP request body. When developers retrieve a file from Workday Drive via the `Get_Drive_Document_Content` SOAP operation or extract a Base64 node from a SOAP response and pass it straight to Document Intelligence, the API fails with HTTP `422` (`Missing or invalid request parameter`), HTTP `500` (`Missing file attachment`), or an unsupported file type error. Even before payload formatting is evaluated, calls can fail with `403 Forbidden` or `NoExtendISOptIn: Extend IS not Opted in for tenant` if the tenant’s Innovation Services opt-in state is incomplete or out of sync.

## Converting Workday Drive Base64 to binary in Orchestrate

When you fetch a document from Workday Drive using `Get_Drive_Document_Content` (or any Workday SOAP web service that returns `xsd:base64Binary`), the file content arrives inside the XML response as a Base64-encoded string. You cannot send that Base64 text directly to `/ml/docint/v1/doc` or `/ml/docint/v1/ids`, and you cannot convert the decoded bytes back into a UTF-8 `String` (which corrupts PDF and image binary headers).

Instead, extract the Base64 text node from the SOAP XML response and call the `Data` member function `.base64decode(contentType)` (or `.base64MimeDecode(contentType)` if the Base64 payload contains line breaks) to produce a binary `Data` object with its MIME type explicitly attached:

1.  In a **Create Values** step (or directly in the `Select Data` expression of your API request), extract the Base64 string from the `Get_Drive_Document_Content` XML response, convert it to `Data`, and decode it with the target MIME type:
    
    javascript
    
    ```
    data.GetDriveDocument.response
      .asXML()
      .stringAtXpath("//wd:File_Content")
      .asData("text/plain")
      .base64decode("application/pdf")
    ```
    
    If the source Base64 string contains MIME line wraps (`\r\n` every 76 characters), use `.base64MimeDecode("application/pdf")` (or `"image/png"`, `"image/jpeg"`, or `"application/octet-stream"`).
2.  In your **Send Workday API Request** step calling `/ml/docint/v1/ids?document_type=us_drivers_license` or `/ml/docint/v1/doc`:
    -   Set **Method** to `POST`.
    -   On the **Body** tab, choose **Reference Existing Data**.
    -   In **Select Data**, reference the decoded `Data` value from step 1.
    -   Set **Content Type** to match the binary stream (`application/octet-stream` or `application/pdf`).

Alternatively, when uploading files from an Extend presentation page, bind a `fileUploader` widget to an **Extend Model Attachment Business Object**. Fetching a Model Attachment Business Object inside Orchestrate already returns the raw binary `Data` stream without Base64 XML wrapping, so you can pass that response directly into the Document Intelligence request body.

## Fixing `403`, `401`, and `Extend IS not Opted in for tenant` errors

If calling `/ml/docint/v1/ids` or `/ml/docint/v1/doc` returns HTTP `403` or `com.workday.ml.ocr.server.ApiEndpoints$NoExtendISOptIn: Extend IS not Opted in for tenant`, verify the tenant setup steps required for Workday AI Gateway:

1.  **Run `Innovation Services Opt-In`:** Under the **Available Services** tab, expand **WCP** and select **Workday AI Gateway**.
2.  **Run `Innovation Services Data Selection Opt-In`:** Select **WCP: Workday AI Gateway** and check the **Opt In** boxes for the document categories your app uses:
    -   *Receipt Scanning for Expenses*
    -   *User Feature Delivery Data*
    -   *Time Series Data Range*
    -   *Generic Documents*
    -   *Skills Analysis Text*
    -   *Generic Text*
    -   *Resume Documents*
3.  **Run `Edit Tenant Setup - Machine Learning`:** (Secured to the *Set Up: Tenant Setup - Machine Learning* domain in the *System* functional area.) Select the hosting region for the Machine Learning Development Environment (MLDE). Note that the hosting region can only be assigned once without a Workday Support case.
4.  **Re-sync a stuck `WCPDEV` opt-in state:** If a Development tenant suddenly throws `NoExtendISOptIn: Extend IS not Opted in for tenant` even though **Innovation Services Opt-In** shows **Workday AI Gateway** checked, uncheck the opt-in boxes, click **OK** to save, and then re-check and save them to force a tenant configuration re-sync (or open a support case if the backend service identity mapping for the tenant requires a refresh). Note that in non-Development tenants, AI Gateway requires an **Extend AI** subscription (or UMSA enablement where applicable).

## Mitigating Resume REST API (`/ml/docint/v1/resume`) layout misclassifications

The Resume REST API (`POST /ml/docint/v1/resume`) accepts `DOCX` and text-based `PDF` files (image-only scanned PDFs are not supported by `/resume`) and returns structured JSON under `ResDoc.resume[0]` (`contact`, `education`, `experience`, `references`, `summary`).

When candidates upload unstructured resumes formatted with multi-column sidebars, nested tables, or non-standard section headers, OCR reading-order extraction can merge adjacent columns and misclassify entities—for example, placing a phone number, address, or candidate name inside the `experience` or `skill` arrays. To handle layout variance reliably in production:

-   **Enforce text-based single-column inputs where possible:** Reject image-only PDFs (`ResDoc.resume` empty) or fall back to `POST /ml/docint/v1/doc` to extract raw OCR text when a PDF has no embedded text layer.
-   **Add post-processing validation in Orchestrate:** Before writing parsed `ResDoc.resume[0]` fields into Workday or an Extend Business Object, validate that `contact[0].name[0].givenname`, `contact[0].name[0].surname`, and `contact[0].phone[0].value` match expected patterns and do not contain newline-delimited section headers (`"WORK EXPERIENCE\n"` or `"EDUCATION\n"`).
-   **Render a human-in-the-loop review page:** Pre-populate an Extend PMD review form with the extracted `contact`, `education`, and `experience` arrays so the recruiter or candidate can verify and correct any column-shifted fields before final submission.

## Verifying the integration in your tenant

Connect an API client such as Bruno to your tenant using a bearer access credential and send a `POST` request to `https://api.workday.com/ml/docint/v1/ids?document_type=us_drivers_license` with a sample binary PDF or PNG attached. Confirm that the endpoint returns HTTP `200 OK` with `text` and `fields[]` (`address`, `date_of_birth`, `document_id`, `expiration_date` with `normalized_value` formatted as `YYYY-MM-DD`). Then trigger your Orchestrate flow on a file stored in Workday Drive and check **Orchestration Activity** to verify that `.base64decode(...)` delivers a valid binary payload to Document Intelligence.

## Sources checked

-   [Concept: Workday AI Gateway](https://developer.workday.com/documentation/GUID-6a9a5c40-42e1-4b9b-911d-ba5457fc61ce)
-   [Document Intelligence REST APIs](https://developer.workday.com/documentation/GUID-149a9890-888f-4f9c-939d-2df499d4bebd-enHYPHENus)
-   [Identification Documents REST API](https://developer.workday.com/documentation/GUID-d3ccde0d-b4f2-4604-a105-58b00743f4be-enHYPHENus)
-   [Resume REST API](https://developer.workday.com/documentation/GUID-f07adb7f-630e-42a2-9de9-a39652e34ec5-enHYPHENus)
-   [Document Scan REST API](https://developer.workday.com/documentation/GUID-bd4cdd16-610d-4b05-ac81-6e3a2e3eb8f9-enHYPHENus)
-   [Reference: Data Member Functions](https://developer.workday.com/documentation/hbp1597828812002)

## Related guides

[All guides](https://kiweely.com/guides)

-   [### Calling External Glean and Sana Agents From Workday Extend Without Hitting 408 Request Timeouts Direct outbound HTTP calls from a Workday Extend PMD page time out with Status Code 408 when an external Glean agent (/rest/api/v1/agents/runs/wait) or Sana webhook exceeds the presentation timeout. Route external agent runs through Workday Orchestrate and External Client CredStore.](https://kiweely.com/guides/workday-extend-external-agents-glean-sana-408-timeout)
-   [### Avoiding the 25-Second Synchronous Timeout When an Extend Page Calls External LLM APIs Through Orchestrate Although Synchronous Orchestrations support up to 5 minutes of execution when called externally, Presentation Components enforce a strict 25-second timeout when a PMD page triggers a Synchronous Orchestration. Refactor multi-step OCR and LLM pipelines to an Asynchronous Orchestration with a BO.](https://kiweely.com/guides/workday-extend-async-orchestration-llm-timeout)
-   [### Passing Large CSV File Attachments From a Workday Custom Agent Flow to Orchestrate Without Hitting Context Limits Passing a multi-thousand-row CSV directly through a Custom Agent Action JSON input forces the LLM to serialize the entire file inside its context window. Store the uploaded CSV in an Extend Attachment Business Object via a PMD fileUploader widget and pass only the Attachment WID to Orchestrate.](https://kiweely.com/guides/workday-custom-agent-csv-file-attachment-orchestrate)
-   [### Why Custom Agent Actions Fail With S22 Permission Denied or Task Not Authorized in Agent Chat Orchestration Builder runs Custom Agent Actions directly as your user, whereas Agent Chat enforces dual ASOR authorization and restricts the Agent System User token to the resources listed in your .agentskill file. Register every REST, SOAP, and WQL resource WID via the Finder API to fix it.](https://kiweely.com/guides/workday-custom-agent-actions-permission-denied-tool-wids)

### More guides on Custom agents and Workday AI

[All 91 guides](https://kiweely.com/guides#custom-agents)

-   [Why a Workday Custom Agent Has No Credentials Tab in Agent Management Hub, and How to Expose It Through A2A](https://kiweely.com/guides/workday-custom-agent-missing-credentials-tab-a2a)
-   [Preventing Duplicate Initiate\_Change\_Job Business Process Events When a Workday Custom Agent Calls a Write Tool](https://kiweely.com/guides/workday-custom-agent-duplicate-initiate-change-job)
-   [Fixing invalid\_request OAuth Token Exchange Errors When Connecting Microsoft Copilot Studio to Workday A2A](https://kiweely.com/guides/workday-a2a-copilot-studio-oauth-invalid-request)
-   [Why Custom Agent Skills Deployed From the Developer Site Don’t Appear in Agent Management Hub, and ASOR Tenant Prerequisites](https://kiweely.com/guides/workday-agent-management-hub-skills-not-showing)
-   [Fixing Workday Developer Agent VS Code Sign-In With a Personal Developer Account and Subagent Interrupt Errors](https://kiweely.com/guides/workday-developer-agent-vscode-personal-account-login)
-   [Finding Workday tool IDs with the Agent Resource Search (finder) API](https://kiweely.com/guides/workday-finder-api-tool-discovery)
-   [Connecting an Extend app to the Workday Self-Service Agent and Microsoft Teams](https://kiweely.com/guides/workday-extend-self-service-agent-teams)
-   [How to build a chatbot in Workday Extend](https://kiweely.com/guides/workday-extend-chatbot)

### From the blog on Custom agents and Workday AI

[All posts](https://kiweely.com/blog)

-   [Bringing Developer-Built Web Apps and HRIS-Built Screens Together in One Employee App](https://kiweely.com/blog/combining-agent-built-and-developer-built-workday-web-apps)
-   [Using an AI Admin Agent to Configure Workday API Clients and Test Role Boundaries](https://kiweely.com/blog/ai-admin-agent-for-workday-connector-setup-and-role-testing)
-   [Copilot, Claude, ChatGPT and Gemini in one company: how each one reaches Workday](https://kiweely.com/blog/microsoft-copilot-vs-claude-chatgpt-gemini-for-workday)

## Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

[Start for free](https://kiweely.com/download) [See how it works](https://kiweely.com/vine/how-it-works)

## Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.
