> Toden documentation. For the full index fetch /llms.txt. Every page is available as Markdown by appending .md to its URL. Identity verification uses /api/kyc, Risk Intelligence uses /api/v1; they are separate contracts with different error shapes. Never invent an endpoint, field or enum value: read the API reference page for the operation first.

# Get a published workflow

GET https://sandbox-api.toden.co/api/kyc/workflows/{workflowId}

Returns a published workflow with the same ID types, branding and address settings as the configuration endpoint, so one request prepares an SDK mounted with a workflow. `idTypes` is empty for a workflow that has no ID step.

A draft, archived or suspended workflow, and one belonging to another organisation or environment, all answer with the same `404`.

**Error codes**

| `error` | Status | Meaning |
|---|---|---|
| `workflow_not_found` | 404 | No published workflow with that id for this organisation and environment. |
| `Missing or invalid Authorization header` | 401 | No bearer credential was sent. |
| `Invalid API key` | 401 | The key is unknown or revoked. |
| `environment_mismatch` | 403 | The key belongs to an environment this host does not serve. |
| `origin_not_allowed` | 403 | The request origin is not on the publishable key allowlist. |
| `ip_not_allowed` | 403 | The caller address is not on the secret key allowlist. |
| `organization_suspended` | 403 | The organisation is suspended. |

Accepts a publishable (`pk_`) or secret (`sk_`) key.

Reference: https://docs.toden.co/api-reference/verification/configuration/get-workflow

## Authentication

- `Authorization` header (bearer token, required) — Send the API key as a Bearer token. Each operation states whether a publishable key is enough or a secret key is required.

## Servers

- `https://sandbox-api.toden.co` (Sandbox, default)
- `https://api.toden.co` (Production)

## Request

### Path parameters

- `workflowId` (string, required) — The workflow public identifier, for example `wf_AbC123dEf456`.

## Response

### 200

The workflow.

- `workflow` (WorkflowResponseWorkflow, required) — The workflow.
- `config` (map from string to any, required) — The published workflow configuration: steps, countries, ID types and appearance.
- `environment` (enum, required) — The environment of the API key.
  - Allowed values: `DEVELOPMENT`, `SANDBOX`, `PRODUCTION`
- `idTypes` (list of ConfigIdType, required) — The ID types enabled for your organisation. Disabled ones are omitted.
- `branding` (ConfigBranding, required) — Your organisation branding, as the SDK shows it.
- `geoCountry` (string, required, nullable) — A best guess at the caller country from their network address, as an ISO 3166 alpha-2 code. A default for forms, never evidence.
- `addressSearch` (boolean, required) — Whether address search is available for the address step.
- `deviceAttestation` (WorkflowResponseDeviceAttestation, required) — What a mobile SDK needs to attest the app it runs in.
- `addressSearchMode` (enum, optional) — How address search behaves. Absent when address search is unavailable.
  - Allowed values: `autocomplete`, `basic`
- `mapsFrameUrl` (string, optional) — The address of the hosted map picker for this caller. Absent when no map picker is available.
- `applicantWorkflow` (WorkflowResponseApplicantWorkflow, optional) — For a business workflow, the workflow the applicant own identity check runs through. Absent when none is mapped.

## Errors

### 401 Unauthorized Error

The Authorization header is missing, or the API key is unknown or revoked.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 403 Forbidden Error

The key may not call this endpoint, or the organisation may not use this feature.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 404 Not Found Error

The resource does not exist for this organisation and environment.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

## Types

### WorkflowResponseWorkflow

The workflow.

- `id` (string, required) — The workflow public identifier.
- `name` (string, required) — The workflow name.
- `version` (integer, required) — The published version.

### ConfigIdType

One ID type your organisation may verify.

- `country` (string, required) — ISO 3166 alpha-2 country code.
- `idType` (string, required) — The ID type to send when creating a verification.
- `supportsNfc` (boolean, required) — Whether the document chip can be read and verified, so the chip step should be offered.
- `label` (string, required) — A display name for the ID type.
- `requiresDocumentCapture` (boolean, required) — Whether the applicant photographs a document, rather than typing a number.
- `scanSides` (enum, required) — Which sides of the document are captured.
  - Allowed values: `front_only`, `front_and_back`
- `features` (ConfigIdTypeFeatures, required) — Which checks are enabled for this ID type.

### ConfigBranding

Your organisation branding, as the SDK shows it.

- `trustAttribution` (ConfigBrandingTrustAttribution, required) — Whose mark appears in the footer of the verification screens.
- `companyName` (string, optional) — Your organisation name.
- `logo` (string, optional) — A public address for your organisation logo. Absent when none is uploaded.

### WorkflowResponseDeviceAttestation

What a mobile SDK needs to attest the app it runs in.

- `playIntegrityCloudProjectNumber` (string, required, nullable) — The project number to request an Android integrity token with, or null when not configured.

### WorkflowResponseApplicantWorkflow

For a business workflow, the workflow the applicant own identity check runs through. Absent when none is mapped.

- `id` (string, required) — The workflow public identifier.
- `name` (string, required) — The workflow name.
- `version` (integer, required) — The published version.
- `config` (map from string to any, required) — Its published configuration.

### ConfigIdTypeFeatures

Which checks are enabled for this ID type.

- `documentVerification` (boolean, required) — Whether document reading is enabled.
- `livenessCheck` (boolean, required) — Whether the selfie and liveness step is enabled.
- `govDbCheck` (boolean, required) — Whether the ID is checked against the government database.

### ConfigBrandingTrustAttribution

Whose mark appears in the footer of the verification screens.

### ConfigBrandingTrustAttribution0

The default footer.

- `mode` ("myaza", required) — The default footer is shown.

### ConfigBrandingTrustAttribution1

Your own footer logo.

- `mode` ("custom", required) — Your own logo is shown.
- `logo` (string, required) — A public address for the footer logo.
- `logoDark` (string, optional) — A public address for the footer logo on dark screens.
- `companyName` (string, optional) — Your organisation name.

## Examples

**Response**

```json
{
  "workflow": {
    "id": "wf_AbC123dEf456",
    "name": "Identity verification",
    "version": 3
  },
  "config": {
    "country": "NG",
    "enableLiveness": true,
    "idTypes": [
      "bvn"
    ]
  },
  "environment": "SANDBOX",
  "idTypes": [
    {
      "country": "NG",
      "idType": "bvn",
      "supportsNfc": false,
      "label": "Bank Verification Number (BVN)",
      "requiresDocumentCapture": false,
      "scanSides": "front_only",
      "features": {
        "documentVerification": true,
        "livenessCheck": true,
        "govDbCheck": true
      }
    }
  ],
  "branding": {
    "trustAttribution": {
      "mode": "myaza"
    },
    "companyName": "Example Ltd"
  },
  "geoCountry": "NG",
  "addressSearch": false,
  "deviceAttestation": {
    "playIntegrityCloudProjectNumber": null
  }
}
```

**SDK Code**

```python
import requests

url = "https://sandbox-api.toden.co/api/kyc/workflows/workflowId"

headers = {"Authorization": "Bearer <apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://sandbox-api.toden.co/api/kyc/workflows/workflowId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.toden.co/api/kyc/workflows/workflowId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.toden.co/api/kyc/workflows/workflowId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://sandbox-api.toden.co/api/kyc/workflows/workflowId")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://sandbox-api.toden.co/api/kyc/workflows/workflowId', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://sandbox-api.toden.co/api/kyc/workflows/workflowId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.toden.co/api/kyc/workflows/workflowId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```