# Stop

To stop a transcription for a room which has a live session being transcribed, you need to execute a **POST** request against the **/rooms/:id/transcription/stop** endpoint.

{% hint style="info" %}
Transcription can also be stopped manually by a moderator inside the live session. Here we describe how to stop the transcription through the REST API, so you can control start / stop transcription externally as an integrator.
{% endhint %}

#### Request

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```bash
curl --request POST \
  --url https://api.digitalsamba.com/api/v1/rooms/c39d7c40-7ff7-4faa-b06f-698a639a9523/transcription/stop \
  --user YOUR_TEAM_ID:YOUR_DEVELOPER_KEY
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}

```java
import com.fasterxml.jackson.databind.ObjectMapper;

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.util.Base64;
import java.util.Map;

String TEAM_ID = "YOUR_TEAM_ID";
String DEVELOPER_KEY = "YOUR_DEVELOPER_KEY";
String authorizationHeader = "Bearer " + Base64.getEncoder().encodeToString((TEAM_ID + ":" + DEVELOPER_KEY).getBytes());
//Put your room id or friendly_url (name) here - this value is just an example
String roomId = "c39d7c40-7ff7-4faa-b06f-698a639a9523";

HttpRequest request = HttpRequest.newBuilder()
  .POST(BodyPublishers.noBody())
  .uri(new URI("https://api.digitalsamba.com/api/v1/rooms/" + roomId + "/transcription/stop"))
  .header("Authorization", authorizationHeader)
  .build();

HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, BodyHandlers.ofString());

System.out.println("Status code: " + response.statusCode());
System.out.println("Body: " + response.body());
```

{% endtab %}
{% endtabs %}

#### Response (200 OK) -> No Content

If no session is active for the room you will receive a generic **400 Bad Request** response.

```json
{
    "message": "Can not stop transcription, this room is not active."
}
```
