Skip to content

Create Credential

Endpoint used to create a credential.

Terminal window
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/credential \
--header 'Authorization: Bearer TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"userId": "uuid",
"unityId": "uuid",
"integrationId": "uuid",
"status": false,
"credentials": [
{
"api_key": "<string>"
}
]
}
'
{
"message": "<string>",
"id": "uuid",
"name": "<string>",
"userId": "uuid",
"unityId": "uuid",
"integrationId": "uuid",
"secretId": "uuid",
"status": false,
"virtualKey": "<string>",
"credentials": {},
"createdAt": "2024-09-03T18:52:29.443Z",
"updatedAt": "2024-09-03T18:52:29.443Z",
"integration": {
"id": "uuid",
"name": "<string>",
"iconId": "uuid",
"type": "<string>",
"status": true,
"validationEndpoint": "<url>",
"slug": "<string>",
"form": [
{
"name": "<string>",
"type": "<string>",
"label": "<string>",
"maxLenght": "<string>",
"required": true
}
],
"createdAt": "2024-09-03T18:52:29.443Z",
"updatedAt": "2024-09-03T18:52:29.443Z",
"icon": {
"id": "uuid",
"institutionId": "uuid",
"type": "<string>",
"fileName": "<string>",
"internalStorageUrl": "<url>",
"url": "<url>",
"maskName": "<string>",
"createdAt": "2024-09-03T18:52:29.443Z",
"updatedAt": "2024-09-03T18:52:29.443Z",
"extension": "<string>",
"size": 123,
"numberWords": null
}
}
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
nameStringCredential identification name in the system.Yes
userIdUUIDUnique identifier of the owning user.Yes
unityIdUUIDLinked organizational unit identifier.Yes
integrationIdUUIDService provider identifier (OpenAI, Gemini, etc.).Yes
statusBooleanDefines if the credential starts active or inactive.No
credentialsArrayList containing technical authentication objects.Yes
credentials[].api_keyStringAccess key or Token provided by the provider.Yes*

Note: The integrationId can be obtained through the GET Integrations endpoint

KeyTypeDescription
messageStringStatus confirmation message of the operation.
idUUIDUnique identifier of the newly created credential.
nameStringIdentification name assigned to the credential.
userIdUUIDIdentifier of the user who performed the creation.
unityIdUUIDLinked organizational unit identifier.
integrationIdUUIDLinked service provider identifier.
secretIdUUIDInternal security identifier for storing the key.
statusBooleanCurrent activation status of the credential.
virtualKeyStringVirtual key generated for internal integration identification.
credentialsObjectObject containing technical data (returned empty for security reasons after creation).
createdAtStringRecord creation date and time.
updatedAtStringRecord last update date and time.
integrationObjectService provider details (OpenAI, Gemini, etc.).
integration.nameStringIntegration service name.
integration.typeStringService type (e.g., “llm” for language models).
integration.slugStringFriendly textual identifier of the provider.
integration.formArrayList of technical fields required by the provider for authentication.
integration.iconObjectIcon image metadata of the service provider.

To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.

To access your access token, follow these steps:

  1. Log in to the ToolzzAI platform
  2. Click on “Settings”
  3. Click on “Access Token”
  4. Copy the access token

Access token page