Skip to main content

Apikeys API Documentation

GET: Retrieve Apikeys

Description

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

Method

GET

Response

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

Status Codes

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

Throws

  • An error if request validation or apikeys retrieval fails.

Example cURL

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


POST: Create a Apikeys

Description

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

Method

POST

Request Body

Example request body:

{
"name": "Apikey Name",
"value": "Apikey value"
}

Response

  • Returns the newly created apikeys.

Status Codes

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

Throws

  • An error if request validation or Apikeys creation fails.

Example cURL

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

PUT: Update a Apikeys

Description

This route is used to update an existing Apikeys.

Method

PUT

Request Body

Example request body:

{
"name": "Apikey Name",
"value": "Apikey value"
}

Response

  • Returns the updated Apikeys.

Status Codes

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

Throws

  • An error if request validation or Apikeys update fails.

Example cURL

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

DELETE: Delete a Apikeys

Description

This route is used to delete an existing Apikeys.

Method

DELETE

Request Body

Example request body:

{
"id": "Apikeys ID"
}

Response

  • Returns a confirmation message indicating successful deletion.

Status Codes

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

Throws

  • An error if request validation or apikeys deletion fails.

Example cURL

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