Skip to main content

ReplaceWords API Documentation

GET: Retrieve ReplaceWords

Description

This route is used to retrieve list of ReplaceWords for a specific project.

Method

GET

Response

  • Returns a JSON response with the list of replaceWords or an error message.

Status Codes

  • 200 OK: ReplaceWords retrieved successfully.
  • 500 Internal Server Error: Error listing ReplaceWords.

Throws

  • An error if request validation or replaceWords retrieval fails.

Example cURL

curl --location 'https://app.ai12z.net/api/projects/{projectId}/settings/replacewords' \
--header 'Authorization: Bearer <YOUR_KEY>' \


POST: Create a ReplaceWords

Description

This route is used to create a new replaceWords for a project.

Method

POST

Request Body

Example request body:

{
"replaceWord": "ReplaceWord Name",
"replaceWith": "replaceWith Name"
}

Response

  • Returns the newly created replaceWords.

Status Codes

  • 200 OK: ReplaceWords created successfully.
  • 500 Internal Server Error: Error creating the ReplaceWords.

Throws

  • An error if request validation or replaceWords creation fails.

Example cURL

curl --location 'https://app.ai12z.net/api/projects/{projectId}/settings/replacewords'\
--header 'Authorization: Bearer <YOUR_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"replaceWord": "ReplaceWord Name",
"replaceWith": "replaceWith Name"
}'

PUT: Update a ReplaceWords

Description

This route is used to update an existing replaceWords.

Method

PUT

Request Body

Example request body:

{
"replaceWord": "ReplaceWord Name",
"replaceWith": "replaceWith Name"
}

Response

  • Returns the updated replaceWords.

Status Codes

  • 200 OK: ReplaceWords updated successfully.
  • 500 Internal Server Error: Error updating the ReplaceWords.

Throws

  • An error if request validation or replaceWords update fails.

Example cURL

curl --location --request PUT 'https://app.ai12z.net/api/projects/{projectId}/settings/replacewords' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"replaceWord": "ReplaceWord Name",
"replaceWith": "replaceWith Name"
}'

DELETE: Delete a ReplaceWords

Description

This route is used to delete an existing replaceWords.

Method

DELETE

Request Body

Example request body:

{
"id": "ReplaceWords ID"
}

Response

  • Returns a confirmation message indicating successful deletion.

Status Codes

  • 200 OK: ReplaceWords deleted successfully.
  • 500 Internal Server Error: Error deleting the ReplaceWords.

Throws

  • An error if request validation or ReplaceWords deletion fails.

Example cURL

curl --location --request DELETE 'https://app.ai12z.net/api/projects/{projectId}/settings/replacewords' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "ReplaceWords ID"
}'