Project Deletion
This guide provides a comprehensive overview of how to safely delete a project using TextUnited's API.
Project deletion is the final step in the lifecycle of a multilingual project within TextUnited. It involves completely removing the project and all associated data from the system. Before proceeding, ensure that all necessary data has been backed up or transferred elsewhere, as this action cannot be undone.
Why Delete a Project?
There are several reasons why you might need to delete a project:
- Completion: The project has been completed, and all data is no longer needed.
- Redundancy: Duplicate projects exist, and only one is required.
- Archiving: The project is being archived for historical purposes but is no longer active.
Prerequisites
Before proceeding with project deletion, ensure you have:
- API Credentials: If you're using Basic Authentication, get your Company ID and API Key. For Bearer JWT Authentication, you'll need your JWT Access Token. Refer to our guides on Obtaining Your API Key and Company ID and Obtaining JWT Token for details.
- Project ID: The unique identifier of the project you wish to delete.
- Understanding of API Basics: Familiarity with RESTful APIs, HTTP methods (DELETE), and JSON format.
Step-by-Step Guide to Deleting a Project by Project ID
Step 1: Confirm Project Deletion
Ensure that deleting the project is the right action for your situation. Consider whether the project's data might still be needed in the future or if there are any outstanding tasks that need to be completed.
Step 2: Construct the API Request
To delete a project, you'll use the /segments/projects/{id}
endpoint. Replace {id}
with the actual ID of the project you wish to delete. The endpoint will look like this:
DELETE /segments/projects/{id}
Additionally, you can optionally include a taskId
query parameter to specify a particular task within the project to delete. This is optional and only necessary if you're targeting a specific task for deletion.
Step 3: Use Path Parameter
The path parameter id
is required and represents the unique identifier of the project you wish to delete. It is part of the URL and is denoted by curly braces {}
. For example, if your project ID is <project_id>
, the URL would be:
DELETE /segments/projects/<project_id>
Step 4: Use Query Parameter (Optional)
If you wish to delete a specific task within the project instead of the entire project, you can add the taskId
query parameter to the URL. The taskId
is a string that uniquely identifies the task you want to delete. For instance, if your task ID is <your_task_id>
, the URL would be:
DELETE /segments/projects/123?taskId=<your_task_id>
Step 5: Send the Request
Using your preferred tool or library, send the DELETE request to the TextUnited API endpoint with the constructed URL. Include your API credentials in the request headers for authentication.
Note
Include your API credentials in the request headers for authentication. Here's an example using curl:
curl --request DELETE \ --url https://api.textunited.com/segments/projects/{id} \ --header 'Authorization: Bearer <your_api_token>' \ --header 'Content-Type: application/json' \ --header 'accept: application/json'
Replace "<your_api_token>" with your actual JWT Access token that can be obtained from calling the Obtain JWT endpoint. Replace {id}
with your project ID.
Try out your Request
To make your request and view your response directly on our documentation platform, you can refer to our API Reference on Delete Project by Project ID.
Step 6: Verify the Deletion
After submitting the request, verify that the project or task has been deleted successfully. You can do this by attempting to retrieve the project's details using a GET request to the same endpoint (Refer to the Project Listing guide or make a direct call to the "Get Projects" endpoint.) If the project or task has been successfully deleted, the API should return an error indicating that the requested project or task does not exist.
Step-by-Step Guide to Deleting a Project by Custom ID
Step 1: Confirm Project Deletion
Take a moment to confirm that deleting the project is indeed the best course of action. Reflect on whether the project's data might still be useful in the future or if there are pending tasks that require attention.
Step 2: Construct the API Request
To delete a project by its custom ID, you'll use the /segments/projects/custom/{customId}
endpoint. Replace {customId}
with the actual custom ID of the project you wish to delete. The endpoint will look like this:
DELETE /segments/projects/custom/{customId}
Optionally, you can include a taskId
query parameter to specify a particular task within the project for deletion. This step is optional and only necessary if you're targeting a specific task for removal.
Step 3: Use Path Parameter
The path parameter customId
is required and represents the unique custom identifier of the project you wish to delete. It is part of the URL and is denoted by curly braces {}
. For example, if your custom project ID is <your_custom_id>
, the URL would be:
DELETE /segments/projects/custom/<your_custom_id>
Step 4: Use Query Parameter (Optional)
If you wish to delete a specific task within the project instead of the entire project, you can add the taskId
query parameter to the URL. The taskId
is a string that uniquely identifies the task you want to delete. For instance, if your task ID is <your_task_id>
, the URL would be:
DELETE /segments/projects/custom/<your_custom_id>?taskId=<your_task_id>
Step 5: Send the Request
Use your preferred tool or library to send the DELETE
request to the TextUnited API endpoint with the constructed URL.
Note
Include your API credentials in the request headers for authentication. Here's an example using curl:
curl --request DELETE \ --url https://api.textunited.com/segments/projects/custom/{customId} \ --header 'Authorization: Bearer <your_api_token>' \ --header 'Content-Type: application/json' \ --header 'accept: application/json'
Replace <your_api_token>
with your actual JWT Access token that can be obtained from calling the Obtain JWT endpoint. Replace {customId}
with your custom project ID.
Try out your Request
To make your request and view your response directly on our documentation platform, you can refer to our API Reference on Delete Project by Custom ID.
Step 6: Verify the Deletion
After submitting the request, verify that the project or task has been deleted successfully. You can do this by attempting to retrieve the project's details using a GET
request to the same endpoint (Refer to the Project Listing guide or make a direct call to the "Get Projects" endpoint.) If the project or task has been successfully deleted, the API should return an error indicating that the requested project or task does not exist.
Updated 22 days ago