> For the complete documentation index, see [llms.txt](https://docs.complycube.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.complycube.com/documentation/api-reference/core-resources/workflow-sessions/complete-a-workflow-session.md).

# Complete a workflow session

### URL

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

Notifies ComplyCube that a workflow session has completed, triggering all configured verification checks.

### 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 fullWidth="false" %}
{% tab title="cURL" %}
{% code fullWidth="false" %}

```bash
curl -X POST https://api.complycube.com/v1/workflowSessions/{:wfSessionId}/complete \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json'
```

{% endcode %}
{% endtab %}

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

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

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

const wfSession = await complycube.workflowSession.complete("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.complete('WORKFLOW_SESSION_ID')
```

{% endcode %}
{% endtab %}

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

```php
use ComplyCube\ComplyCubeClient;

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

$workflowSession = $ccapi->workflowSessions()->complete('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.CompleteAsync("WORKFLOW_SESSION_ID");
```

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

### Example response

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

```json
{
    "status": "processing"
}
```

{% endcode %}
{% endtab %}

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

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

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
