Get Credentials by Unit
Endpoint used to get credentials by unit.
Request Example
Section titled “Request Example”curl --request GET \ --url https://chat.api.toolzz.com.br/api/v1/credential/unity/{id} \ --header 'Authorization: Bearer TOKEN_HERE' \Response Example
Section titled “Response Example”{ "items": [ { "id": "<string>", "name": "<string>", "userId": "<string>", "unityId": "<string>", "integrationId": "<string>", "secretId": "<string>", "status": true, "virtualKey": "<string>", "credentials": {}, "createdAt": "<string>", "updatedAt": "<string>", "integration": { "id": "<string>", "name": "<string>", "iconId": "<string>", "type": "<string>", "status": true, "validationEndpoint": "<string>", "slug": "<string>", "form": [ { "name": "<string>", "label": "<string>", "type": "<string>", "maxLength": 123, "required": true, "description": "<string>" } ], "createdAt": "<string>", "updatedAt": "<string>", "icon": { "id": "<string>", "createdAt": "<string>", "updatedAt": "<string>", "institutionId": "<string>", "type": "<string>", "fileName": "<string>", "internalStorageUrl": "<string>", "url": "<string>", "size": 123, "extension": "<string>", "maskName": "<string>" } } } ]}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
URL Parameters (Path)
Section titled “URL Parameters (Path)”| Parameter | Type | Description | Required |
|---|---|---|---|
unityId | String | Unit ID | Yes |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
items | Array | List containing the objects of the registered credentials. |
items[].id | UUID | Unique identifier of the credential. |
items[].name | String | Name assigned to the credential (e.g., “My OpenAI Key”). |
items[].userId | UUID | Identifier of the user who owns the credential. |
items[].unityId | UUID | Identifier of the organizational unit to which the credential belongs. |
items[].integrationId | UUID | Identifier of the linked integration type. |
items[].secretId | UUID | Internal identifier of the secret stored in the key vault. |
items[].status | Boolean | Indicates if the credential is active and ready for use. |
items[].virtualKey | String | Virtual key used to mask the real identification in logs and routes. |
items[].credentials | Object | Object with technical authentication fields (usually omitted in the listing for security reasons). |
items[].createdAt | String | Record creation date and time. |
items[].integration | Object | Object containing details of the integration provider. |
items[].integration.name | String | Service provider name (e.g., “Gemini”, “Stripe”). |
items[].integration.type | String | Integration category (e.g., llm, voice, monetization). |
items[].integration.slug | String | Friendly textual identifier of the provider. |
items[].integration.form | Array | Definition of the form fields required by this provider. |
items[].integration.form[].label | String | Display name of the field in the interface. |
items[].integration.form[].required | Boolean | Defines if the field is mandatory to configure the credential. |
items[].integration.icon | Object | Metadata of the integration’s icon image file. |
items[].integration.icon.url | URL | Direct link to the provider’s logo image. |
items[].integration.icon.size | Number | Image file size in bytes. |
items[].integration.icon.extension | String | File extension (e.g., png, svg). |
Security
Section titled “Security”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:
- Log in to the ToolzzAI platform
- Click on “Settings”
- Click on “Access Token”
- Copy the access token
