# Get a workflow session

### URL

<mark style="color:blue;">**GET**</mark> `https://api.complycube.com/v1/workflowSessions/:id`

Retrieves an existing workflow session.

### Headers

<table><thead><tr><th width="259">Name</th><th width="80">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Authorization</code><mark style="color:red;">*</mark></td><td>string</td><td>The API <code>live</code> or <code>test</code> key.</td></tr></tbody></table>

### Path parameters

<table><thead><tr><th width="260">Name</th><th width="82">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code><mark style="color:red;">*</mark></td><td>string</td><td>The ID of the workflow session.</td></tr></tbody></table>

### Example request

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET https://api.complycube.com/v1/workflowSessions/{:workflowSessionId} \
     -H 'Authorization: <YOUR_API_KEY>' 
```

{% endtab %}

{% tab title="Node.js" %}
{% code overflow="wrap" %}

```javascript
const { ComplyCube } = require("@complycube/api");

const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });

const wfSession = await complycube.workflowSession.get("WORKFLOW_SESSION_ID");
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code overflow="wrap" %}

```python
from complycube import ComplyCubeClient

cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')

workflow_session = cc_api.workflowsessions.get('WORKFLOW_SESSION_ID')
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}
{% code overflow="wrap" %}

```php
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');

$workflowSession = $ccapi->workflowSessions()->get('WORKFLOW_SESSION_ID');
```

{% endcode %}
{% endtab %}

{% tab title=".NET" %}
{% code overflow="wrap" %}

```csharp
using ComplyCube.Net;
using ComplyCube.Net.Resources.WorkflowSessions;

var wfSessionApi = new WorkflowSessionApi(new ComplyCubeClient("<YOUR_API_KEY>"));

var workflowSession = await wfSessionApi.GetAsync("WORKFLOW_SESSION_ID");
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Example response

{% tabs fullWidth="false" %}
{% tab title="Success (200)" %}
{% code overflow="wrap" %}

```json
{
    "id": "5eb2b61e02df0a0008f1cf2a",
    "clientId": "5eb1276d96be4a0008713af5",
    "entityName": "John Doe",
    "status": "complete",
    "workflowTemplateId": "68566be2a37a78622f4f7be3",
    "workflowId": "68566be3a37a78622f4f7be7",
    "workflowTemplateName": "AML + Liveness + Document Verification flow",
    "workflowVersion": 1,
    "workflowDescription": "Initial version",
    "compliancePolicies": [],
    "tasks": [],
    "lastCompletedTaskId": "task_id_123",
    "allRelatedChecks": [
        {
            "checkId": "689c78f619987c0002774921",
            "type": "document_check",
            "taskId": "..."
        },
        {
            "checkId": "689c78f619987c0002774922",
            "type": "identity_check",
            "taskId": "..."
        },
        {
            "checkId": "689c78f619987c0002774923",
            "type": "extensive_screening_check",
            "taskId": "..."
        }
    ],
    "outcome": "clear",
    "createdAt": "2025-01-13T11:35:20.592Z",
    "completedAt": "2025-01-13T11:37:30.124Z",
    "updatedAt": "2025-01-13T11:39:30.124Z",
    "policyAssurance": []
}
```

{% endcode %}
{% endtab %}

{% tab title="Resource Not Found (404)" %}

```json
{
    "type": "resource_not_found",
    "message": "Invalid workflow session id '5eb2b61e02df0a0008f1cf2b'"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.complycube.com/documentation/api-reference/core-resources/workflow-sessions/get-a-workflow-session.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
