Crear un atributo personalizado
curl --request POST \
--url https://api.revem.ai/custom-attributes/public/v1/{entityType} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"options": [
"<string>"
],
"isRequired": true,
"isFilterable": true,
"isAgentVisible": true,
"isUnique": true,
"disabledFunnelIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"defaultValue": "<unknown>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
options: ['<string>'],
isRequired: true,
isFilterable: true,
isAgentVisible: true,
isUnique: true,
disabledFunnelIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
defaultValue: '<unknown>'
})
};
fetch('https://api.revem.ai/custom-attributes/public/v1/{entityType}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revem.ai/custom-attributes/public/v1/{entityType}"
payload = {
"name": "<string>",
"description": "<string>",
"options": ["<string>"],
"isRequired": True,
"isFilterable": True,
"isAgentVisible": True,
"isUnique": True,
"disabledFunnelIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"defaultValue": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"entityType": "ticket",
"name": "<string>",
"dataType": "<string>",
"description": "<string>",
"options": [
"<string>"
],
"optionCount": 123,
"isRequired": true,
"isFilterable": true,
"isAgentVisible": true,
"isUnique": true,
"disabledFunnelIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"defaultValue": "<unknown>"
}{
"ok": true,
"error": "<string>"
}{
"error": "Unauthorized",
"message": "Invalid API key"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": false,
"error": "Too many requests. Retry in 60 seconds."
}{
"ok": true,
"error": "<string>"
}Atributos personalizados
Crear un atributo personalizado
Crea una definición para tickets, contactos u organizaciones. El tipo se fija al crearla; select/multi_select requieren opciones. Los campos opcionales conservan los valores predeterminados del catálogo.
POST
/
custom-attributes
/
public
/
v1
/
{entityType}
Crear un atributo personalizado
curl --request POST \
--url https://api.revem.ai/custom-attributes/public/v1/{entityType} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"options": [
"<string>"
],
"isRequired": true,
"isFilterable": true,
"isAgentVisible": true,
"isUnique": true,
"disabledFunnelIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"defaultValue": "<unknown>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
options: ['<string>'],
isRequired: true,
isFilterable: true,
isAgentVisible: true,
isUnique: true,
disabledFunnelIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
defaultValue: '<unknown>'
})
};
fetch('https://api.revem.ai/custom-attributes/public/v1/{entityType}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revem.ai/custom-attributes/public/v1/{entityType}"
payload = {
"name": "<string>",
"description": "<string>",
"options": ["<string>"],
"isRequired": True,
"isFilterable": True,
"isAgentVisible": True,
"isUnique": True,
"disabledFunnelIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"defaultValue": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"entityType": "ticket",
"name": "<string>",
"dataType": "<string>",
"description": "<string>",
"options": [
"<string>"
],
"optionCount": 123,
"isRequired": true,
"isFilterable": true,
"isAgentVisible": true,
"isUnique": true,
"disabledFunnelIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"defaultValue": "<unknown>"
}{
"ok": true,
"error": "<string>"
}{
"error": "Unauthorized",
"message": "Invalid API key"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": false,
"error": "Too many requests. Retry in 60 seconds."
}{
"ok": true,
"error": "<string>"
}Authorizations
Path Parameters
Body
application/json
Response
Definición creada.
