It is possible to delete a session or image (media) before the defined retention period (ttl) is over.
Deleting the session will also delete all media from that session. You can delete a session yourself by sending a DELETE request to the endpoint below.
DELETE https://api.yoti.com/idverify/v1/sessions/{sessionId}SDK Example:
x
const { RequestBuilder} = require("yoti");const request = new RequestBuilder() .withBaseUrl("https://api.yoti.com/idverify/v1") .withPemFilePath("<YOTI_KEY_FILE_PATH>") // file path to PEM file .withEndpoint("/sessions/<sessionId>") .withMethod("DELETE") .withQueryParam("sdkId", "<YOTI_CLIENT_SDK_ID>") .build();//get Yoti responseconst response = await request.execute();Yoti recommends starting a new session for the same applicant doing a re-verification or needing to edit their session.
Error Response
//400 response{ "code": "MALFORMED_REQUEST", "errors": [ { "property": "header.X-Yoti-Auth-Digest", "message": "must not be null or empty" } ]}| Error code | Description |
|---|---|
| 400 | Invalid payload or request missing headers or query params |
| 401 | Unauthorised request (wrong key or signature) |
| 404 | App not found |
| 409 | The checks are not finished |
Was this page helpful?