> This page is for BaaS.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.docs.api.corpx.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.docs.api.corpx.com/_mcp/server.

# Issue a biometry capture token

POST https://tenant.api.corpx.com/v1/accreditations/{accreditationId}/capture

Issues a new capture token for an accreditation whose tenant uses centralized biometry. The previous token stops working. Only while status is PENDING_BIOMETRY.


Reference: https://en.docs.api.corpx.com/baas/referencia/accreditations/issue-accreditation-capture

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `accreditationId` (string, required) — Accreditation (onboarding) identifier returned on creation.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `Idempotency-Key` (string, optional) — Optional client-generated idempotency token (recommended for safe retries).

## Response

### 200

New capture token.

- `captureToken` (string, optional)
- `expiresAt` (datetime, optional)
- `captureUrl` (string, optional)

## Errors

### 409 Conflict Error

Capture is not available in the current status.

- `any`

### 503 Service Unavailable Error

Centralized biometry is not configured.

- `any`

## Examples

**Response**

```json
{
  "captureToken": "eyJraWQiOiJ...redacted",
  "expiresAt": "2026-02-20T08:33:39Z",
  "captureUrl": "https://example.com/webhooks/corpx"
}
```

**SDK Code**

```python Accreditations_issueAccreditationCapture_example
import requests

url = "https://tenant.api.corpx.com/v1/accreditations/accreditationId/capture"

headers = {
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```javascript Accreditations_issueAccreditationCapture_example
const url = 'https://tenant.api.corpx.com/v1/accreditations/accreditationId/capture';
const options = {
  method: 'POST',
  headers: {'X-Tenant-Id': 'X-Tenant-Id', Authorization: 'Bearer <token>'}
};

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

```go Accreditations_issueAccreditationCapture_example
package main

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

func main() {

	url := "https://tenant.api.corpx.com/v1/accreditations/accreditationId/capture"

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

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://tenant.api.corpx.com/v1/accreditations/accreditationId/capture")

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

request = Net::HTTP::Post.new(url)
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.post("https://tenant.api.corpx.com/v1/accreditations/accreditationId/capture")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tenant.api.corpx.com/v1/accreditations/accreditationId/capture', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp Accreditations_issueAccreditationCapture_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accreditations/accreditationId/capture");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Accreditations_issueAccreditationCapture_example
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accreditations/accreditationId/capture")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```