Documentation de l’API
Centre d’aideOpenAPI
ConnexionCréer une clé API

Guides

IntroductionAuthentificationErreursPaginationIdempotenceLimites de débitWebhooksSDK

Référence

Contacts

GETLister les contactsPOSTCréer un contactGETRécupérer un contactPATCHModifier un contactDELSupprimer un contactGETExporter les données d’un contactPOSTAjouter une notePOSTTaguer un contactDELRetirer un tag d’un contact

Entreprises

GETLister les entreprisesPOSTCréer une entrepriseGETRécupérer une entreprisePATCHModifier une entrepriseDELSupprimer une entreprise

Tags

GETLister les tagsPOSTCréer un tagPATCHModifier un tagDELSupprimer un tag

Conversations et messages

GETLister les conversationsPOSTCréer une conversationGETRécupérer une conversationPATCHModifier une conversationPOSTEnvoyer un messagePOSTTaguer une conversationDELRetirer un tag d’une conversationGETCompter les conversationsGETLister les réponses prédéfiniesPOSTCréer une réponse prédéfiniePATCHModifier une réponse prédéfinieDELSupprimer une réponse prédéfiniePOSTPOST /v1/conversations/{id}/mergePOSTPOST /v1/conversations/{id}/side-conversations

Équipes

GETLister les équipesPOSTCréer une équipePATCHModifier une équipeDELSupprimer une équipePOSTAjouter un agent à une équipeDELRetirer un agent d’une équipe

Agents

GETLister les agentsGETRécupérer un agentPATCHModifier un agent

Tickets

GETLister les ticketsPOSTCréer un ticketGETRécupérer un ticketPATCHModifier un ticketPOSTCommenter un ticketGETCompter les échéances de tickets

Base de connaissances

GETLister les articlesPOSTCréer un articleGETLire un articlePATCHModifier un articleDELSupprimer un articleGETLister les catégoriesPOSTCréer une catégorieDELSupprimer une catégorie

Centre d’aide public

GETCentre d’aide publicGETLire un article publicPOSTVoter pour un article

Pièces jointes

POSTDemander une URL d’envoiPOSTRenouveler une URL de lecturePUTEnvoyer le fichierGETTélécharger une pièce jointe

Automatisations

GETLister les automatisationsPOSTCréer une automatisationPATCHModifier une automatisationDELSupprimer une automatisationPOSTTester une automatisationGETHistorique d’exécution

Statistiques

GETVue d’ensemble des statistiquesGETLister les avis de satisfactionPOSTEnregistrer un avis de satisfactionGETExporter en CSV

Segments

GETLister les segmentsPOSTCréer un segmentDELSupprimer un segmentGETLire un segmentPATCHModifier un segmentGETLister les contacts d’un segment

Attributs de données

GETLister les attributs de donnéesPOSTCréer un attribut de donnéesDELSupprimer un attribut de donnéesGETLire un attribut de donnéesPATCHModifier un attribut de données

Objets personnalisés

GETLister les types d’objet personnaliséPOSTCréer un type d’objet personnaliséDELSupprimer un type d’objet personnaliséGETLire un type d’objet personnaliséPATCHModifier un type d’objet personnaliséGETLister les objets personnalisésPOSTCréer un objet personnaliséDELSupprimer un objet personnaliséGETLire un objet personnaliséPATCHModifier un objet personnalisé

Événements

GETLister les événementsPOSTCréer un événementDELSupprimer un événementGETLire un événement

Abonnements

GETLister les types d’abonnementPOSTCréer un type d’abonnementDELSupprimer un type d’abonnementGETLire un type d’abonnementPATCHModifier un type d’abonnementGETLire les abonnements d’un contactPUTEnregistrer le choix d’un contact

Types et statuts de ticket

GETLister les types de ticketPOSTCréer un type de ticketDELSupprimer un type de ticketGETLire un type de ticketPATCHModifier un type de ticketGETLister les statuts de ticketPOSTCréer un statut de ticketDELSupprimer un statut de ticketGETLire un statut de ticketPATCHModifier un statut de ticket

Heures d’ouverture

GETLister les horaires d’ouverturePOSTCréer un horaire d’ouvertureDELSupprimer un horaire d’ouvertureGETLire un horaire d’ouverturePATCHModifier un horaire d’ouvertureGETSavoir si l’équipe est ouverte

Marques

GETLister les marquesPOSTCréer une marqueDELSupprimer une marqueGETLire une marquePATCHModifier une marque

Dossiers

GETLister les dossiersPOSTCréer un dossierDELSupprimer un dossierGETLire un dossierPATCHModifier un dossier

Articles internes

GETLister les articles internesPOSTCréer un article interneDELSupprimer un article interneGETLire un article internePATCHModifier un article interne

Actualités

GETLister les actualitésPOSTCréer une actualitéDELSupprimer une actualitéGETLire une actualitéPATCHModifier une actualité

Plages IP autorisées

GETLister les plages IP autoriséesPOSTCréer une plage IP autoriséeDELSupprimer une plage IP autoriséeGETLire une plage IP autoriséePATCHModifier une plage IP autorisée

Tâches asynchrones

POSTLancer une tâche asynchroneGETLister les tâchesGETLire une tâcheGETTélécharger le résultat d’une tâche

Messages sortants

POSTEnvoyer un message sortantGETLister les messages sortantsGETLire un message sortant

Agent UN

GETÉtat de l’agent UNPOSTSuggérer des articles

Rôles

GETLister les rôlesPOSTCréer un rôle personnaliséDELSupprimer un rôle personnaliséPATCHModifier un rôle personnalisé

API REST v1

Documentation de l’API

Intégrez UNIRELIA à vos applications : contacts, conversations, tickets, centre d’aide et pièces jointes, avec des webhooks signés.

Contacts9Entreprises5Tags4Conversations et messages14Équipes6Agents3Tickets6Base de connaissances8Centre d’aide public3Pièces jointes4Automatisations6Statistiques4Segments6Attributs de données5Objets personnalisés10Événements4Abonnements7Types et statuts de ticket10Heures d’ouverture6Marques5Dossiers5Articles internes5Actualités5Plages IP autorisées5Tâches asynchrones4Messages sortants3Agent UN2Rôles4

Introduction

L’API UNIRELIA est une API REST qui échange du JSON en UTF-8. Toutes les routes sont préfixées par /v1 et chaque requête est limitée à votre organisation.

Les identifiants sont des UUID, les dates suivent le format ISO 8601 en UTC.

URL de basehttps://unirelia.com/v1
cURL
curl "https://unirelia.com/v1/kb/public/atlas"

Authentification

Créez une application et une clé dans Développeurs → Applications et clés. Envoyez-la dans l’en-tête Authorization de chaque requête.

Chaque clé porte des autorisations (scopes) : une requête qui en demande davantage reçoit une erreur 403. Ne publiez jamais une clé dans du code exécuté par le navigateur.

HeaderAuthorization: Bearer nx_live_…
curl "https://unirelia.com/v1/contacts?limit=20" \
  -H "Authorization: Bearer nx_live_7f3a…"

Erreurs

Les erreurs utilisent les codes HTTP standards et un corps JSON commun. Conservez request_id : il permet à notre équipe de retrouver la requête.

Les erreurs 4xx signalent une requête à corriger : ne les rejouez pas telles quelles. Les erreurs 429 et 5xx peuvent être retentées avec un délai croissant.

  • 400bad_request
  • 401unauthorized
  • 403forbidden
  • 404not_found
  • 409conflict
  • 422validation_failed
  • 429rate_limited
  • 500internal_error
JSON
{
  "error": {
    "code": "validation_failed",
    "message": "name: Required",
    "details": [
      {
        "path": [
          "name"
        ],
        "message": "Required"
      }
    ],
    "request_id": "req_01JDX4M8Q2"
  }
}

Pagination

Les listes renvoient un tableau data et un champ next_page_token. Passez ce jeton dans page_token pour obtenir la page suivante ; il vaut null à la dernière page.

Le paramètre limit accepte de 1 à 100 éléments (50 par défaut).

let pageToken = null;
do {
  const url = new URL('/v1/contacts', BASE_URL);
  url.searchParams.set('limit', '100');
  if (pageToken) url.searchParams.set('page_token', pageToken);
  const res = await fetch(url, { headers: { Authorization: `Bearer ${KEY}` } });
  const { data, next_page_token } = await res.json();
  data.forEach(handleContact);
  pageToken = next_page_token;
} while (pageToken);

Idempotence

Pour les créations, ajoutez un en-tête Idempotency-Key unique (8 à 128 caractères). En cas de nouvel essai avec la même clé, la réponse d’origine est renvoyée sans créer de doublon.

Pour l’envoi de messages, le champ clientMessageId joue le même rôle.

curl -X POST "https://unirelia.com/v1/tickets" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Idempotency-Key: order-4821-ticket" \
  -H "Content-Type: application/json" \
  -d '{"title":"Retard de livraison"}'

Limites de débit

Chaque clé API peut effectuer 600 requêtes par minute. Au-delà, l’API répond 429 avec l’en-tête Retry-After indiquant le délai d’attente en secondes.

Espacez vos appels et privilégiez les webhooks plutôt que l’interrogation régulière.

async function call(url, init, attempt = 0) {
  const res = await fetch(url, init);
  if (res.status !== 429 || attempt >= 3) return res;
  const wait = Number(res.headers.get('Retry-After') ?? 1);
  await new Promise((r) => setTimeout(r, wait * 1000));
  return call(url, init, attempt + 1);
}

Webhooks

Déclarez une URL HTTPS dans Développeurs → Webhooks et choisissez les événements. Chaque envoi contient les en-têtes X-Unirelia-Event-Id, X-Unirelia-Timestamp et X-Unirelia-Signature.

La signature vaut t=<timestamp>,v1=<HMAC-SHA256 hexadécimal de « timestamp.corps » avec votre secret>. En cas d’échec, l’envoi est retenté jusqu’à 5 fois.

Événements disponibles

  • conversation.created
  • conversation.updated
  • message.created
  • contact.created
  • ticket.created
  • ticket.updated
import crypto from 'node:crypto';

// rawBody: raw request body (Buffer), before any JSON.parse
export function verify(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const expected = crypto
    .createHmac('sha256', secret)
    .update(`${parts.t}.${rawBody}`)
    .digest('hex');
  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  return fresh && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}

SDK

Les SDK enveloppent l’API : authentification, nouvelles tentatives, idempotence automatique des créations et erreurs typées. Node.js, Python et PHP sont des clients serveur (clé secrète nx_) ; Flutter et React Native sont des clients mobiles (clé publique pk_ uniquement).

Ils ne sont pas encore publiés sur npm, PyPI, Packagist ni pub.dev : installez-les depuis le dépôt, avec les commandes ci-contre. Ne placez jamais une clé secrète nx_ dans une application mobile ou un navigateur.

# from source (not published on npm yet)
pnpm --filter @unirelia/sdk-js build
pnpm add /path/to/repo/app/packages/sdk-js

import { UnireliaClient } from '@unirelia/sdk-js/node';

const unirelia = new UnireliaClient({ apiKey: process.env.UNIRELIA_API_KEY, baseUrl: 'https://unirelia.com/v1' });
const { data } = await unirelia.contacts.list({ q: 'ada' });

Contacts

Lister les contacts

GET/v1/contacts

Renvoie les contacts de l’organisation, du plus récent au plus ancien, avec recherche par nom, e-mail ou entreprise.

Autorisationcontacts:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

  • qstringrequête

    Texte recherché.

Requête
curl -X GET "https://unirelia.com/v1/contacts" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "01066019-a34b-4475-90bf-2945d2b496a0",
      "external_id": "crm-4821",
      "name": "Aminata Diallo",
      "email": "[email protected]",
      "phone": "+225 07 00 00 00",
      "company": "Ivoire Shop",
      "custom_fields": {
        "plan": "pro"
      },
      "tags": [],
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": "eyJzIjoiMjAyNi0xMS0yOSIsImkiOiIwMTA2In0"
}

Créer un contact

POST/v1/contacts

Crée un contact. Un e-mail déjà connu dans l’organisation est refusé pour éviter les doublons.

Autorisationcontacts:write

Paramètres

  • Idempotency-Keystringen-tête

    Clé unique pour rejouer la requête sans doublon.

  • namestringcorpsobligatoire

    Nom affiché.

  • emailstringcorps

    Adresse e-mail.

  • phonestringcorps

    Numéro de téléphone.

  • companystringcorps

    Entreprise.

  • companyIdstringcorps

    Identifiant de l’entreprise liée au contact.

  • externalIdstringcorps

    Votre identifiant interne.

  • customFieldsobjectcorps

    Attributs libres (objet JSON).

Requête
curl -X POST "https://unirelia.com/v1/contacts" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Idempotency-Key: 3f1c9a2e-7b44-4d0c" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Aminata Diallo",
    "email": "[email protected]",
    "company": "Ivoire Shop",
    "externalId": "crm-4821",
    "customFields": {
      "plan": "pro"
    }
  }'
Réponse
{
  "id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "external_id": "crm-4821",
  "name": "Aminata Diallo",
  "email": "[email protected]",
  "phone": "+225 07 00 00 00",
  "company": "Ivoire Shop",
  "custom_fields": {
    "plan": "pro"
  },
  "tags": [],
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Récupérer un contact

GET/v1/contacts/{id}

Renvoie un contact avec ses tags et ses compteurs d’activité.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/contacts/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "external_id": "crm-4821",
  "name": "Aminata Diallo",
  "email": "[email protected]",
  "phone": "+225 07 00 00 00",
  "company": "Ivoire Shop",
  "custom_fields": {
    "plan": "pro"
  },
  "tags": [],
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un contact

PATCH/v1/contacts/{id}

Met à jour uniquement les champs envoyés.

Autorisationcontacts:write

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • emailstringcorps

    Adresse e-mail.

  • phonestringcorps

    Numéro de téléphone.

  • companystringcorps

    Entreprise.

  • companyIdstringcorps

    Identifiant de l’entreprise liée au contact.

  • externalIdstringcorps

    Votre identifiant interne.

  • customFieldsobjectcorps

    Attributs libres (objet JSON).

Requête
curl -X PATCH "https://unirelia.com/v1/contacts/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "company": "Ivoire Shop SARL"
  }'
Réponse
{
  "id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "external_id": "crm-4821",
  "name": "Aminata Diallo",
  "email": "[email protected]",
  "phone": "+225 07 00 00 00",
  "company": "Ivoire Shop SARL",
  "custom_fields": {
    "plan": "pro"
  },
  "tags": [],
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un contact

DEL/v1/contacts/{id}

Supprime définitivement le contact et ses notes.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/contacts/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Exporter les données d’un contact

GET/v1/contacts/{id}/export

Renvoie toutes les données du contact (notes, conversations, messages, tickets). L’export est journalisé.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/contacts/0e488aa4-ea43-49ad-a216-eecef28174bc/export" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "exported_at": "2026-11-29T09:40:00Z",
  "contact": {
    "id": "01066019-a34b-4475-90bf-2945d2b496a0",
    "external_id": "crm-4821",
    "name": "Aminata Diallo",
    "email": "[email protected]",
    "phone": "+225 07 00 00 00",
    "company": "Ivoire Shop",
    "custom_fields": {
      "plan": "pro"
    },
    "tags": [],
    "created_at": "2026-11-29T09:12:04Z",
    "updated_at": "2026-11-29T09:12:04Z"
  },
  "notes": [],
  "conversations": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "subject": "Commande #4821 en retard",
      "status": "open",
      "priority": "high",
      "created_at": "2026-11-29T09:15:40Z"
    }
  ],
  "messages": [],
  "tickets": [
    {
      "id": "1e227a90-40b0-4aa3-816e-e3f83e2bd1bf",
      "number": 42,
      "title": "Retard de livraison",
      "status": "open",
      "priority": "high",
      "created_at": "2026-11-29T09:20:00Z"
    }
  ]
}

Ajouter une note

POST/v1/contacts/{id}/notes

Ajoute une note interne visible uniquement par votre équipe.

Autorisationcontacts:write

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • bodystringcorpsobligatoire

    Contenu du texte.

Requête
curl -X POST "https://unirelia.com/v1/contacts/0e488aa4-ea43-49ad-a216-eecef28174bc/notes" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "Client prioritaire, rappeler avant 18 h."
  }'
Réponse
{
  "id": "b1c2d3e4-0000-4000-8000-000000000001",
  "body": "Client prioritaire, rappeler avant 18 h.",
  "created_at": "2026-11-29T09:30:00Z"
}

Taguer un contact

POST/v1/contacts/{id}/tags

Associe un tag existant au contact.

Autorisationcontacts:write

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • tagIduuidcorpsobligatoire

    Identifiant du tag.

Requête
curl -X POST "https://unirelia.com/v1/contacts/0e488aa4-ea43-49ad-a216-eecef28174bc/tags" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tagId": "8b05d86d-ca12-4738-ad2a-7cb78e68e7a7"
  }'
Réponse
Réponse vide (204)

Retirer un tag d’un contact

DEL/v1/contacts/{id}/tags/{tagId}

Retire un tag déjà associé au contact.

Autorisationcontacts:write

Paramètres

  • tagIduuidcheminobligatoire

    Identifiant du tag.

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/contacts/0e488aa4-ea43-49ad-a216-eecef28174bc/tags/8b05d86d-ca12-4738-ad2a-7cb78e68e7a7" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Entreprises

Lister les entreprises

GET/v1/companies

Renvoie les entreprises clientes, avec recherche par nom ou domaine.

Autorisationcontacts:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

  • qstringrequête

    Texte recherché.

Requête
curl -X GET "https://unirelia.com/v1/companies" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "c0a1b2c3-0000-4000-8000-000000000010",
      "name": "Ivoire Shop",
      "domain": "ivoire-shop.ci",
      "status": "active"
    }
  ],
  "next_page_token": "eyJzIjoiMjAyNi0xMS0yOSIsImkiOiIwMTA2In0"
}

Créer une entreprise

POST/v1/companies

Crée l’entreprise d’un client. Le statut vaut active par défaut, ou archived.

Autorisationcontacts:write

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • domainstringcorps

    Nom de domaine, par exemple ivoire-shop.ci.

  • websitestringcorps

    Adresse du site.

  • phonestringcorps

    Numéro de téléphone.

  • emailstringcorps

    Adresse e-mail.

  • sectorstringcorps

    Secteur d’activité.

  • sizestringcorps

    Taille de l’entreprise.

  • descriptionstringcorps

    Description.

  • customFieldsobjectcorps

    Attributs libres (objet JSON).

  • statusenumcorps

    Statut de la ressource.

Requête
curl -X POST "https://unirelia.com/v1/companies" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ivoire Shop",
    "domain": "ivoire-shop.ci"
  }'
Réponse
{
  "id": "c0a1b2c3-0000-4000-8000-000000000010",
  "name": "Ivoire Shop",
  "domain": "ivoire-shop.ci",
  "status": "active"
}

Récupérer une entreprise

GET/v1/companies/{id}

Renvoie l’entreprise et les contacts qui lui sont liés.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/companies/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "c0a1b2c3-0000-4000-8000-000000000010",
  "name": "Ivoire Shop",
  "domain": "ivoire-shop.ci",
  "status": "active",
  "contacts": [
    {
      "id": "01066019-a34b-4475-90bf-2945d2b496a0",
      "external_id": "crm-4821",
      "name": "Aminata Diallo",
      "email": "[email protected]",
      "phone": "+225 07 00 00 00",
      "company": "Ivoire Shop",
      "custom_fields": {
        "plan": "pro"
      },
      "tags": [],
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ]
}

Modifier une entreprise

PATCH/v1/companies/{id}

Met à jour uniquement les champs envoyés.

Autorisationcontacts:write

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • domainstringcorps

    Nom de domaine, par exemple ivoire-shop.ci.

  • websitestringcorps

    Adresse du site.

  • phonestringcorps

    Numéro de téléphone.

  • emailstringcorps

    Adresse e-mail.

  • sectorstringcorps

    Secteur d’activité.

  • sizestringcorps

    Taille de l’entreprise.

  • descriptionstringcorps

    Description.

  • customFieldsobjectcorps

    Attributs libres (objet JSON).

  • statusenumcorps

    Statut de la ressource.

Requête
curl -X PATCH "https://unirelia.com/v1/companies/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "archived"
  }'
Réponse
{
  "id": "c0a1b2c3-0000-4000-8000-000000000010",
  "name": "Ivoire Shop",
  "domain": "ivoire-shop.ci",
  "status": "archived"
}

Supprimer une entreprise

DEL/v1/companies/{id}

Supprime l’entreprise. Les contacts liés ne sont pas supprimés.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/companies/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Tags

Lister les tags

GET/v1/tags

Renvoie les tags de l’organisation.

Autorisationcontacts:read

Requête
curl -X GET "https://unirelia.com/v1/tags" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "8b05d86d-ca12-4738-ad2a-7cb78e68e7a7",
      "name": "Facturation",
      "color": "#d97706"
    }
  ]
}

Créer un tag

POST/v1/tags

Crée un tag avec une couleur hexadécimale facultative.

Autorisationcontacts:write

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • colorstringcorps

    Couleur hexadécimale, par exemple #d97706.

Requête
curl -X POST "https://unirelia.com/v1/tags" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Facturation",
    "color": "#d97706"
  }'
Réponse
{
  "id": "8b05d86d-ca12-4738-ad2a-7cb78e68e7a7",
  "name": "Facturation",
  "color": "#d97706"
}

Modifier un tag

PATCH/v1/tags/{id}

Renomme un tag ou change sa couleur ; il reste associé à ses contacts, conversations et tickets.

Autorisationcontacts:write

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • colorstringcorps

    Couleur hexadécimale, par exemple #d97706.

Requête
curl -X PATCH "https://unirelia.com/v1/tags/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Facturation client",
    "color": "#d97706"
  }'
Réponse
{
  "id": "8b05d86d-ca12-4738-ad2a-7cb78e68e7a7",
  "name": "Facturation client",
  "color": "#d97706"
}

Supprimer un tag

DEL/v1/tags/{id}

Supprime le tag et le retire de tous les contacts, conversations et tickets qui le portent.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/tags/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Conversations et messages

Lister les conversations

GET/v1/conversations

Filtre par vue (all, unassigned, mine, open, pending, resolved) et par texte.

Autorisationconversations:read

Paramètres

  • assigneestringrequête

  • teamstringrequête

    Filtrer par identifiant d’équipe.

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

  • qstringrequête

    Texte recherché.

  • viewstringrequête

    all, unassigned, mine, open, pending ou resolved.

Requête
curl -X GET "https://unirelia.com/v1/conversations" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
      "contact_name": "Aminata Diallo",
      "status": "open",
      "priority": "normal",
      "subject": "Commande #4821 en retard",
      "channel": "manual",
      "assignee_id": null,
      "team_id": null,
      "last_message_at": "2026-11-29T09:15:40Z",
      "created_at": "2026-11-29T09:15:40Z"
    }
  ],
  "next_page_token": "eyJzIjoiMjAyNi0xMS0yOSIsImkiOiIwMTA2In0"
}

Créer une conversation

POST/v1/conversations

Ouvre une conversation pour un contact, avec un premier message facultatif. Elle apparaît aussitôt dans la boîte de réception.

Autorisationconversations:handle

Paramètres

  • Idempotency-Keystringen-tête

    Clé unique pour rejouer la requête sans doublon.

  • contactIduuidcorpsobligatoire

    Identifiant du contact.

  • subjectstringcorps

    Objet.

  • priorityenumcorps

    low, normal, high ou urgent.

  • assigneeIdstringcorps

    Agent assigné.

  • teamIdstringcorps

    Équipe assignée.

  • initialMessagestringcorps

    Premier message, envoyé au contact au nom de l’équipe.

Requête
curl -X POST "https://unirelia.com/v1/conversations" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Idempotency-Key: 3f1c9a2e-7b44-4d0c" \
  -H "Content-Type: application/json" \
  -d '{
    "contactId": "01066019-a34b-4475-90bf-2945d2b496a0",
    "subject": "Commande #4821 en retard",
    "priority": "high",
    "initialMessage": "Bonjour Aminata, nous avons bien noté le retard de votre commande #4821."
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "contact_name": "Aminata Diallo",
  "status": "open",
  "priority": "normal",
  "subject": "Commande #4821 en retard",
  "channel": "manual",
  "assignee_id": null,
  "team_id": null,
  "last_message_at": "2026-11-29T09:15:40Z",
  "created_at": "2026-11-29T09:15:40Z"
}

Récupérer une conversation

GET/v1/conversations/{id}

Renvoie la conversation, ses messages et le contexte du contact.

Autorisationconversations:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/conversations/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "contact_name": "Aminata Diallo",
  "status": "open",
  "priority": "normal",
  "subject": "Commande #4821 en retard",
  "channel": "manual",
  "assignee_id": null,
  "team_id": null,
  "last_message_at": "2026-11-29T09:15:40Z",
  "created_at": "2026-11-29T09:15:40Z",
  "messages": [
    {
      "id": "f0e1d2c3-0000-4000-8000-000000000002",
      "author_type": "agent",
      "body": "Bonjour Aminata, nous avons bien noté le retard de votre commande #4821.",
      "is_internal": false,
      "created_at": "2026-11-29T09:15:40Z"
    }
  ]
}

Modifier une conversation

PATCH/v1/conversations/{id}

Change le statut, la priorité, l’agent ou l’équipe assignés.

Autorisationconversations:handle

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • statusenumcorps

    Statut de la ressource.

  • priorityenumcorps

    low, normal, high ou urgent.

  • assigneeIdstringcorps

    Agent assigné.

  • teamIdstringcorps

    Équipe assignée.

  • subjectstringcorps

    Objet.

  • spambooleancorps

Requête
curl -X PATCH "https://unirelia.com/v1/conversations/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "resolved"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "contact_name": "Aminata Diallo",
  "status": "resolved",
  "priority": "normal",
  "subject": "Commande #4821 en retard",
  "channel": "manual",
  "assignee_id": null,
  "team_id": null,
  "last_message_at": "2026-11-29T09:15:40Z",
  "created_at": "2026-11-29T09:15:40Z"
}

Envoyer un message

POST/v1/conversations/{id}/messages

Ajoute une réponse ou une note interne (isInternal) à la conversation. Les notes internes ne sont jamais envoyées au client.

Autorisationconversations:note

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • Idempotency-Keystringen-tête

    Clé unique pour rejouer la requête sans doublon.

  • bodystringcorpsobligatoire

    Contenu du texte.

  • isInternalbooleancorps

    true pour une note interne.

  • clientMessageIdstringcorps

    Identifiant unique côté client (anti-doublon).

  • attachmentsarraycorps

    Pièces jointes jointes au message : objets { name, mimeType, size, url } (10 max).

  • attachmentIdsuuid[]corps

    Pièces jointes déjà envoyées (10 max).

  • mentionsuuid[]corps

Requête
curl -X POST "https://unirelia.com/v1/conversations/0e488aa4-ea43-49ad-a216-eecef28174bc/messages" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Idempotency-Key: 3f1c9a2e-7b44-4d0c" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "Votre colis part aujourd’hui, voici le suivi.",
    "clientMessageId": "msg-4821-01"
  }'
Réponse
{
  "id": "a9b8c7d6-0000-4000-8000-000000000003",
  "conversation_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "author_type": "agent",
  "body": "Votre colis part aujourd’hui, voici le suivi.",
  "is_internal": false,
  "created_at": "2026-11-29T09:18:02Z"
}

Taguer une conversation

POST/v1/conversations/{id}/tags

Associe un tag existant à la conversation.

Autorisationconversations:handle

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • tagIduuidcorpsobligatoire

    Identifiant du tag.

Requête
curl -X POST "https://unirelia.com/v1/conversations/0e488aa4-ea43-49ad-a216-eecef28174bc/tags" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tagId": "8b05d86d-ca12-4738-ad2a-7cb78e68e7a7"
  }'
Réponse
Réponse vide (204)

Retirer un tag d’une conversation

DEL/v1/conversations/{id}/tags/{tagId}

Retire un tag déjà associé à la conversation.

Autorisationconversations:handle

Paramètres

  • tagIduuidcheminobligatoire

    Identifiant du tag.

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/conversations/0e488aa4-ea43-49ad-a216-eecef28174bc/tags/8b05d86d-ca12-4738-ad2a-7cb78e68e7a7" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Compter les conversations

GET/v1/conversations/counts

Nombre de conversations par vue (toutes, non assignées, les miennes, urgentes, ouvertes…) et par équipe.

Autorisationconversations:read

Requête
curl -X GET "https://unirelia.com/v1/conversations/counts" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "views": {
    "all": 128,
    "unassigned": 9,
    "mine": 14,
    "mentions": 2,
    "spam": 5,
    "created": 6,
    "un": 17,
    "handoff": 2,
    "urgent": 3,
    "open": 41,
    "pending": 12,
    "resolved": 70
  },
  "teams": [
    {
      "id": "3a9c6d12-88e0-4b77-a1c4-55e0d9ab2202",
      "name": "Support",
      "count": 22
    }
  ],
  "members": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "name": "Awa Koné",
      "count": 14
    }
  ]
}

Lister les réponses prédéfinies

GET/v1/saved-replies

Renvoie les textes que les agents insèrent dans une réponse.

Autorisationconversations:read

Requête
curl -X GET "https://unirelia.com/v1/saved-replies" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "d1e2f3a4-0000-4000-8000-000000000011",
      "title": "Accusé de réception",
      "shortcut": "accueil",
      "body": "Bonjour, nous avons bien reçu votre message."
    }
  ]
}

Créer une réponse prédéfinie

POST/v1/saved-replies

Crée un texte réutilisable, avec un raccourci facultatif.

Autorisationconversations:handle

Paramètres

  • titlestringcorpsobligatoire

    Titre.

  • shortcutstringcorps

    Raccourci saisi dans le compositeur, 30 caractères maximum.

  • bodystringcorpsobligatoire

    Contenu du texte.

Requête
curl -X POST "https://unirelia.com/v1/saved-replies" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Accusé de réception",
    "shortcut": "accueil",
    "body": "Bonjour, nous avons bien reçu votre message."
  }'
Réponse
{
  "id": "d1e2f3a4-0000-4000-8000-000000000011",
  "title": "Accusé de réception",
  "shortcut": "accueil",
  "body": "Bonjour, nous avons bien reçu votre message."
}

Modifier une réponse prédéfinie

PATCH/v1/saved-replies/{id}

Met à jour le titre, le texte ou le raccourci.

Autorisationconversations:handle

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • titlestringcorps

    Titre.

  • shortcutstringcorps

    Raccourci saisi dans le compositeur, 30 caractères maximum.

  • bodystringcorps

    Contenu du texte.

Requête
curl -X PATCH "https://unirelia.com/v1/saved-replies/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "shortcut": "recu"
  }'
Réponse
{
  "id": "d1e2f3a4-0000-4000-8000-000000000011",
  "title": "Accusé de réception",
  "shortcut": "recu",
  "body": "Bonjour, nous avons bien reçu votre message."
}

Supprimer une réponse prédéfinie

DEL/v1/saved-replies/{id}

Supprime définitivement la réponse prédéfinie.

Autorisationconversations:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/saved-replies/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

POST /v1/conversations/{id}/merge

POST/v1/conversations/{id}/merge

Autorisationconversations:handle

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • targetIduuidcorpsobligatoire

Requête
curl -X POST "https://unirelia.com/v1/conversations/0e488aa4-ea43-49ad-a216-eecef28174bc/merge" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "targetId": "0e488aa4-ea43-49ad-a216-eecef28174bc"
  }'
Réponse
{}

POST /v1/conversations/{id}/side-conversations

POST/v1/conversations/{id}/side-conversations

Autorisationconversations:handle

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • subjectstringcorps

    Objet.

  • assigneeIdstringcorps

    Agent assigné.

  • teamIdstringcorps

    Équipe assignée.

  • notestringcorpsobligatoire

Requête
curl -X POST "https://unirelia.com/v1/conversations/0e488aa4-ea43-49ad-a216-eecef28174bc/side-conversations" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "note"
  }'
Réponse
{}

Équipes

Lister les équipes

GET/v1/teams

Renvoie les équipes, leur responsable et leurs agents.

Autorisationteams:read

Requête
curl -X GET "https://unirelia.com/v1/teams" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "3a9c6d12-88e0-4b77-a1c4-55e0d9ab2202",
      "name": "Support",
      "lead_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
      "lead_name": "Awa Koné",
      "members": [
        {
          "user_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
          "name": "Awa Koné"
        }
      ]
    }
  ]
}

Créer une équipe

POST/v1/teams

Crée une équipe de réception, avec un responsable facultatif.

Autorisationteams:manage

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • leadIdstringcorps

    Identifiant de l’agent responsable.

Requête
curl -X POST "https://unirelia.com/v1/teams" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support",
    "leadId": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001"
  }'
Réponse
{
  "id": "3a9c6d12-88e0-4b77-a1c4-55e0d9ab2202",
  "name": "Support",
  "lead_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
  "lead_name": "Awa Koné",
  "members": [
    {
      "user_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
      "name": "Awa Koné"
    }
  ]
}

Modifier une équipe

PATCH/v1/teams/{id}

Change le nom ou le responsable. Le responsable d’équipe ne peut modifier que la sienne.

Autorisationteams:manage_own

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorpsobligatoire

    Nom affiché.

  • leadIdstringcorps

    Identifiant de l’agent responsable.

Requête
curl -X PATCH "https://unirelia.com/v1/teams/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support prioritaire",
    "leadId": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001"
  }'
Réponse
{
  "id": "3a9c6d12-88e0-4b77-a1c4-55e0d9ab2202",
  "name": "Support prioritaire",
  "lead_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
  "lead_name": "Awa Koné",
  "members": [
    {
      "user_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
      "name": "Awa Koné"
    }
  ]
}

Supprimer une équipe

DEL/v1/teams/{id}

Supprime l’équipe. Les conversations qui lui étaient assignées perdent cette assignation.

Autorisationteams:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/teams/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Ajouter un agent à une équipe

POST/v1/teams/{id}/members

Ajoute un agent existant à l’équipe.

Autorisationteams:manage_own

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • userIduuidcorpsobligatoire

    Identifiant de l’agent.

Requête
curl -X POST "https://unirelia.com/v1/teams/0e488aa4-ea43-49ad-a216-eecef28174bc/members" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001"
  }'
Réponse
{
  "id": "3a9c6d12-88e0-4b77-a1c4-55e0d9ab2202",
  "name": "Support",
  "lead_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
  "lead_name": "Awa Koné",
  "members": [
    {
      "user_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
      "name": "Awa Koné"
    }
  ]
}

Retirer un agent d’une équipe

DEL/v1/teams/{id}/members/{userId}

Retire l’agent de l’équipe, sans le supprimer de l’organisation.

Autorisationteams:manage_own

Paramètres

  • userIduuidcheminobligatoire

    Identifiant de l’agent.

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/teams/0e488aa4-ea43-49ad-a216-eecef28174bc/members/7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Agents

Lister les agents

GET/v1/members

Renvoie les agents de l’organisation, leur rôle et leurs équipes.

Autorisationmembers:read

Requête
curl -X GET "https://unirelia.com/v1/members" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "user_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
      "name": "Awa Koné",
      "email": "[email protected]",
      "status": "active",
      "role": {
        "id": "b4e8f021-11aa-4d33-9c70-88aa11bb3303",
        "key": "agent",
        "name": "Agent"
      },
      "teams": [
        {
          "id": "3a9c6d12-88e0-4b77-a1c4-55e0d9ab2202",
          "name": "Support"
        }
      ]
    }
  ]
}

Récupérer un agent

GET/v1/members/{userId}

Renvoie un agent par son identifiant utilisateur.

Autorisationmembers:read

Paramètres

  • userIduuidcheminobligatoire

    Identifiant de l’agent.

Requête
curl -X GET "https://unirelia.com/v1/members/7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "user_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
  "name": "Awa Koné",
  "email": "[email protected]",
  "status": "active",
  "role": {
    "id": "b4e8f021-11aa-4d33-9c70-88aa11bb3303",
    "key": "agent",
    "name": "Agent"
  },
  "teams": [
    {
      "id": "3a9c6d12-88e0-4b77-a1c4-55e0d9ab2202",
      "name": "Support"
    }
  ]
}

Modifier un agent

PATCH/v1/members/{userId}

Change le rôle ou le statut (active ou disabled). Un agent désactivé ne se connecte plus.

Autorisationmembers:manage

Paramètres

  • userIduuidcheminobligatoire

    Identifiant de l’agent.

  • roleIduuidcorps

    Identifiant du rôle.

  • statusenumcorps

    Statut de la ressource.

Requête
curl -X PATCH "https://unirelia.com/v1/members/7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "disabled"
  }'
Réponse
{
  "user_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
  "name": "Awa Koné",
  "email": "[email protected]",
  "status": "disabled",
  "role": {
    "id": "b4e8f021-11aa-4d33-9c70-88aa11bb3303",
    "key": "agent",
    "name": "Agent"
  },
  "teams": [
    {
      "id": "3a9c6d12-88e0-4b77-a1c4-55e0d9ab2202",
      "name": "Support"
    }
  ]
}

Tickets

Lister les tickets

GET/v1/tickets

Filtre par statut (new, open, in_progress, pending, resolved, closed) et par texte.

Autorisationtickets:read

Paramètres

  • duestringrequête

    overdue (échéance dépassée) ou soon (dans les 24 h), tickets non résolus.

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

  • qstringrequête

    Texte recherché.

  • statusstringrequête

    Statut de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/tickets" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "1e227a90-40b0-4aa3-816e-e3f83e2bd1bf",
      "number": 42,
      "title": "Retard de livraison",
      "description": "Colis bloqué au dépôt.",
      "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
      "conversation_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "status": "open",
      "priority": "high",
      "assignee_id": null,
      "due_at": null,
      "created_at": "2026-11-29T09:20:00Z"
    }
  ],
  "next_page_token": "eyJzIjoiMjAyNi0xMS0yOSIsImkiOiIwMTA2In0"
}

Créer un ticket

POST/v1/tickets

Crée un ticket, éventuellement lié à un contact et à une conversation.

Autorisationtickets:handle

Paramètres

  • Idempotency-Keystringen-tête

    Clé unique pour rejouer la requête sans doublon.

  • titlestringcorpsobligatoire

    Titre.

  • descriptionstringcorps

    Description.

  • contactIdstringcorps

    Identifiant du contact.

  • conversationIdstringcorps

    Conversation liée.

  • priorityenumcorps

    low, normal, high ou urgent.

  • assigneeIdstringcorps

    Agent assigné.

  • teamIdstringcorps

    Équipe assignée.

  • dueAtstringcorps

    Échéance (ISO 8601).

  • typeIdstringcorps

    Identifiant du type d’abonnement ou de ticket.

  • stateIdstringcorps

    Identifiant du statut personnalisé ; sa catégorie fixe le statut du ticket.

  • attributesobjectcorps

    Valeurs des attributs du type de ticket (objet JSON, 20 maximum).

  • kindenumcorps

    Type de canal : whatsapp, email, calls, ecommerce, data ou canvas.

Requête
curl -X POST "https://unirelia.com/v1/tickets" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Idempotency-Key: 3f1c9a2e-7b44-4d0c" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Retard de livraison",
    "description": "Colis bloqué au dépôt.",
    "contactId": "01066019-a34b-4475-90bf-2945d2b496a0",
    "priority": "high"
  }'
Réponse
{
  "id": "1e227a90-40b0-4aa3-816e-e3f83e2bd1bf",
  "number": 42,
  "title": "Retard de livraison",
  "description": "Colis bloqué au dépôt.",
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "conversation_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "status": "open",
  "priority": "high",
  "assignee_id": null,
  "due_at": null,
  "created_at": "2026-11-29T09:20:00Z"
}

Récupérer un ticket

GET/v1/tickets/{id}

Renvoie le ticket avec ses commentaires et son historique.

Autorisationtickets:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/tickets/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "1e227a90-40b0-4aa3-816e-e3f83e2bd1bf",
  "number": 42,
  "title": "Retard de livraison",
  "description": "Colis bloqué au dépôt.",
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "conversation_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "status": "open",
  "priority": "high",
  "assignee_id": null,
  "due_at": null,
  "created_at": "2026-11-29T09:20:00Z",
  "comments": [],
  "events": []
}

Modifier un ticket

PATCH/v1/tickets/{id}

Change le statut, la priorité, l’assignation ou l’échéance.

Autorisationtickets:handle

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • titlestringcorps

    Titre.

  • descriptionstringcorps

    Description.

  • statusenumcorps

    Statut de la ressource.

  • priorityenumcorps

    low, normal, high ou urgent.

  • assigneeIdstringcorps

    Agent assigné.

  • teamIdstringcorps

    Équipe assignée.

  • dueAtstringcorps

    Échéance (ISO 8601).

  • typeIdstringcorps

    Identifiant du type d’abonnement ou de ticket.

  • stateIdstringcorps

    Identifiant du statut personnalisé ; sa catégorie fixe le statut du ticket.

  • attributesobjectcorps

    Valeurs des attributs du type de ticket (objet JSON, 20 maximum).

Requête
curl -X PATCH "https://unirelia.com/v1/tickets/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "resolved"
  }'
Réponse
{
  "id": "1e227a90-40b0-4aa3-816e-e3f83e2bd1bf",
  "number": 42,
  "title": "Retard de livraison",
  "description": "Colis bloqué au dépôt.",
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "conversation_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "status": "resolved",
  "priority": "high",
  "assignee_id": null,
  "due_at": null,
  "created_at": "2026-11-29T09:20:00Z"
}

Commenter un ticket

POST/v1/tickets/{id}/comments

Ajoute un commentaire interne au ticket.

Autorisationtickets:handle

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • bodystringcorpsobligatoire

    Contenu du texte.

  • isInternalbooleancorps

    true pour une note interne.

Requête
curl -X POST "https://unirelia.com/v1/tickets/0e488aa4-ea43-49ad-a216-eecef28174bc/comments" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "Transporteur relancé, retour attendu sous 24 h."
  }'
Réponse
{
  "id": "c0d1e2f3-0000-4000-8000-000000000004",
  "body": "Transporteur relancé, retour attendu sous 24 h.",
  "created_at": "2026-11-29T10:02:00Z"
}

Compter les échéances de tickets

GET/v1/tickets/due-counts

Nombre de tickets dont l’échéance est dépassée (overdue) ou tombe dans les 24 h (soon).

Autorisationtickets:read

Requête
curl -X GET "https://unirelia.com/v1/tickets/due-counts" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "overdue": 2,
  "soon": 5
}

Base de connaissances

Lister les articles

GET/v1/kb/articles

Renvoie les articles de la base de connaissances, publiés ou non.

Autorisationarticles:read

Paramètres

  • qstringrequête

    Texte recherché.

  • statusstringrequête

    Statut de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/kb/articles" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "articles": [
    {
      "id": "c7ab92ee-a266-40d8-8ef7-c453b03809eb",
      "category_id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
      "title": "Installer le widget",
      "slug": "installer-le-widget",
      "summary": "Une ligne de script suffit.",
      "status": "published",
      "views_count": 142
    }
  ]
}

Créer un article

POST/v1/kb/articles

Crée un article ; le contenu HTML est assaini côté serveur.

Autorisationarticles:manage

Paramètres

  • Idempotency-Keystringen-tête

    Clé unique pour rejouer la requête sans doublon.

  • category_idstringcorps

    Catégorie de l’article.

  • titlestringcorpsobligatoire

    Titre.

  • slugstringcorps

    Identifiant d’URL : minuscules, chiffres et tirets.

  • summarystringcorpsobligatoire

    Résumé affiché dans la recherche.

  • bodystringcorpsobligatoire

    Contenu du texte.

  • statusenumcorpsobligatoire

    Statut de la ressource.

Requête
curl -X POST "https://unirelia.com/v1/kb/articles" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Idempotency-Key: 3f1c9a2e-7b44-4d0c" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Installer le widget",
    "summary": "Une ligne de script suffit.",
    "body": "Copiez la ligne d’intégration depuis Réglages → Widget…",
    "status": "published"
  }'
Réponse
{
  "id": "c7ab92ee-a266-40d8-8ef7-c453b03809eb",
  "category_id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
  "title": "Installer le widget",
  "slug": "installer-le-widget",
  "summary": "Une ligne de script suffit.",
  "status": "published",
  "views_count": 142
}

Lire un article

GET/v1/kb/articles/{id}

Renvoie un article de la base de connaissances avec son contenu complet.

Autorisationarticles:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/kb/articles/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "article": {
    "id": "c7ab92ee-a266-40d8-8ef7-c453b03809eb",
    "category_id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
    "title": "Installer le widget",
    "slug": "installer-le-widget",
    "summary": "Une ligne de script suffit.",
    "status": "published",
    "views_count": 142,
    "category_name": "Démarrage rapide",
    "body": "Copiez la ligne d’intégration depuis Réglages → Widget…"
  }
}

Modifier un article

PATCH/v1/kb/articles/{id}

Met à jour le contenu ou le statut (draft, published, archived).

Autorisationarticles:manage

Paramètres

  • idstringcheminobligatoire

    Identifiant de la ressource.

  • category_idstringcorps

    Catégorie de l’article.

  • titlestringcorps

    Titre.

  • slugstringcorps

    Identifiant d’URL : minuscules, chiffres et tirets.

  • summarystringcorps

    Résumé affiché dans la recherche.

  • bodystringcorps

    Contenu du texte.

  • statusenumcorps

    Statut de la ressource.

Requête
curl -X PATCH "https://unirelia.com/v1/kb/articles/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "draft"
  }'
Réponse
{
  "id": "c7ab92ee-a266-40d8-8ef7-c453b03809eb",
  "category_id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
  "title": "Installer le widget",
  "slug": "installer-le-widget",
  "summary": "Une ligne de script suffit.",
  "status": "draft",
  "views_count": 142
}

Supprimer un article

DEL/v1/kb/articles/{id}

Supprime définitivement l’article.

Autorisationarticles:manage

Paramètres

  • idstringcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/kb/articles/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "ok": true
}

Lister les catégories

GET/v1/kb/categories

Renvoie les catégories et le nombre d’articles de chacune.

Autorisationarticles:read

Requête
curl -X GET "https://unirelia.com/v1/kb/categories" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "categories": [
    {
      "id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
      "name": "Démarrage rapide",
      "slug": "demarrage-rapide",
      "description": "Installer et configurer votre espace",
      "articles_count": 3
    }
  ]
}

Créer une catégorie

POST/v1/kb/categories

Crée une catégorie du centre d’aide. Le slug ne contient que des minuscules, des chiffres et des tirets.

Autorisationarticles:manage

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • slugstringcorps

    Identifiant d’URL : minuscules, chiffres et tirets.

  • descriptionstringcorpsobligatoire

    Description.

  • sort_orderintegercorpsobligatoire

    Ordre d’affichage, de 0 à 999.

Requête
curl -X POST "https://unirelia.com/v1/kb/categories" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Démarrage rapide",
    "slug": "demarrage-rapide"
  }'
Réponse
{
  "category": {
    "id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
    "name": "Démarrage rapide",
    "slug": "demarrage-rapide"
  }
}

Supprimer une catégorie

DEL/v1/kb/categories/{id}

Supprime la catégorie. Les articles qu’elle contenait restent dans la base.

Autorisationarticles:manage

Paramètres

  • idstringcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/kb/categories/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "ok": true
}

Centre d’aide public

Centre d’aide public

GET/v1/kb/public/{orgSlug}

Renvoie les catégories et les articles publiés d’une organisation. Sans authentification.

AutorisationPublic, sans clé

Paramètres

  • orgSlugstringcheminobligatoire

    Identifiant public de l’organisation.

  • categorystringrequête

    Catégorie : open, pending, resolved ou closed.

  • qstringrequête

    Texte recherché.

Requête
curl -X GET "https://unirelia.com/v1/kb/public/atlas"
Réponse
{
  "organization": {
    "name": "Atlas",
    "slug": "atlas"
  },
  "categories": [],
  "articles": [
    {
      "id": "c7ab92ee-a266-40d8-8ef7-c453b03809eb",
      "category_id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
      "title": "Installer le widget",
      "slug": "installer-le-widget",
      "summary": "Une ligne de script suffit.",
      "status": "published",
      "views_count": 142
    }
  ]
}

Lire un article public

GET/v1/kb/public/{orgSlug}/articles/{articleSlug}

Renvoie un article publié par son identifiant d’URL.

AutorisationPublic, sans clé

Paramètres

  • articleSlugstringcheminobligatoire

    Identifiant d’URL de l’article.

  • orgSlugstringcheminobligatoire

    Identifiant public de l’organisation.

Requête
curl -X GET "https://unirelia.com/v1/kb/public/atlas/articles/installer-le-widget"
Réponse
{
  "id": "c7ab92ee-a266-40d8-8ef7-c453b03809eb",
  "category_id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
  "title": "Installer le widget",
  "slug": "installer-le-widget",
  "summary": "Une ligne de script suffit.",
  "status": "published",
  "views_count": 142,
  "body": "<p>Copiez la ligne d’intégration…</p>"
}

Voter pour un article

POST/v1/kb/public/{orgSlug}/articles/{articleId}/vote

Enregistre un vote « utile » ou « pas utile » et renvoie les totaux.

AutorisationPublic, sans clé

Paramètres

  • articleIdstringcheminobligatoire

    Identifiant de l’article.

  • orgSlugstringcheminobligatoire

    Identifiant public de l’organisation.

  • helpfulbooleancorpsobligatoire

    true si l’article a aidé.

Requête
curl -X POST "https://unirelia.com/v1/kb/public/atlas/articles/c7ab92ee-a266-40d8-8ef7-c453b03809eb/vote" \
  -H "Content-Type: application/json" \
  -d '{
    "helpful": true
  }'
Réponse
{
  "helpful_yes": 29,
  "helpful_no": 0
}

Pièces jointes

Demander une URL d’envoi

POST/v1/attachments/upload-url

Renvoie une URL temporaire pour envoyer un fichier (10 Mo max), puis utilisez attachmentId dans un message.

Autorisationconversations:handle

Paramètres

  • filenamestringcorpsobligatoire

    Nom du fichier.

  • mimeTypestringcorpsobligatoire

    Type MIME (image ou PDF).

  • sizeBytesintegercorpsobligatoire

    Taille en octets.

  • conversationIduuidcorps

    Conversation liée.

Requête
curl -X POST "https://unirelia.com/v1/attachments/upload-url" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "facture.pdf",
    "mimeType": "application/pdf",
    "sizeBytes": 184320,
    "conversationId": "0e488aa4-ea43-49ad-a216-eecef28174bc"
  }'
Réponse
{
  "attachmentId": "e5f6a7b8-0000-4000-8000-000000000005",
  "uploadUrl": "/v1/attachments/upload?token=…",
  "expiresAt": "2026-11-29T09:25:00Z",
  "maxBytes": 10485760
}

Renouveler une URL de lecture

POST/v1/attachments/{id}/refresh-url

Renvoie une nouvelle URL temporaire pour télécharger une pièce jointe.

Autorisationconversations:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X POST "https://unirelia.com/v1/attachments/0e488aa4-ea43-49ad-a216-eecef28174bc/refresh-url" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "e5f6a7b8-0000-4000-8000-000000000005",
  "url": "/v1/attachments/download?token=…",
  "expiresAt": "2026-11-29T10:25:00Z"
}

Envoyer le fichier

PUT/v1/attachments/upload

Envoie le fichier en binaire (corps brut) vers l’URL temporaire reçue. Le jeton remplace la clé API.

AutorisationPublic, sans clé

Paramètres

  • tokenstringrequêteobligatoire

    Jeton temporaire reçu avec l’URL d’envoi ou de lecture.

Requête
curl -X PUT "https://unirelia.com/v1/attachments/upload?token=TOKEN" \
  --data-binary @facture.pdf
Réponse
{
  "id": "e5f6a7b8-0000-4000-8000-000000000005",
  "filename": "facture.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 184320,
  "url": "/v1/attachments/download?token=…",
  "expiresAt": "2026-11-29T10:25:00Z"
}

Télécharger une pièce jointe

GET/v1/attachments/download

Renvoie le fichier associé au jeton temporaire. Ajoutez download=1 pour forcer le téléchargement.

AutorisationPublic, sans clé

Paramètres

  • downloadstringrequête

    1 pour forcer le téléchargement plutôt que l’affichage.

  • tokenstringrequêteobligatoire

    Jeton temporaire reçu avec l’URL d’envoi ou de lecture.

Requête
curl -X GET "https://unirelia.com/v1/attachments/download?token=TOKEN"
Réponse
Le corps de la réponse est le fichier lui-même, pas du JSON.

Automatisations

Lister les automatisations

GET/v1/automations

Renvoie les règles d’automatisation de l’organisation.

Autorisationautomations:read

Requête
curl -X GET "https://unirelia.com/v1/automations" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "automations": [
    {
      "id": "f1a2b3c4-0000-4000-8000-000000000020",
      "name": "Orienter la facturation",
      "description": "",
      "trigger_type": "message_received",
      "conditions": {
        "keyword": "facture"
      },
      "actions": [
        {
          "type": "add_tag",
          "value": "Facturation"
        },
        {
          "type": "assign_team",
          "value": "Support"
        }
      ],
      "enabled": true,
      "priority": 10,
      "created_at": "2026-11-29T09:00:00Z"
    }
  ]
}

Créer une automatisation

POST/v1/automations

Crée une règle : un déclencheur, des conditions facultatives et de 1 à 10 actions.

Autorisationautomations:manage

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • descriptionstringcorpsobligatoire

    Description.

  • trigger_typeenumcorpsobligatoire

    Déclencheur : conversation_created, message_received, ticket_created ou ticket_resolved.

  • conditionsobjectcorpsobligatoire

    Conditions facultatives : keyword, channel, priority (objet JSON).

  • actionsarraycorpsobligatoire

    Liste de 1 à 10 actions { type, value } : assign_team, assign_member, add_tag, send_auto_reply, set_priority ou notify.

  • enabledbooleancorpsobligatoire

    true pour activer la règle.

  • priorityintegercorpsobligatoire

    low, normal, high ou urgent.

Requête
curl -X POST "https://unirelia.com/v1/automations" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Orienter la facturation",
    "trigger_type": "message_received",
    "conditions": {
      "keyword": "facture"
    },
    "actions": [
      {
        "type": "add_tag",
        "value": "Facturation"
      },
      {
        "type": "assign_team",
        "value": "Support"
      }
    ]
  }'
Réponse
{
  "automation": {
    "id": "f1a2b3c4-0000-4000-8000-000000000020",
    "name": "Orienter la facturation",
    "description": "",
    "trigger_type": "message_received",
    "conditions": {
      "keyword": "facture"
    },
    "actions": [
      {
        "type": "add_tag",
        "value": "Facturation"
      },
      {
        "type": "assign_team",
        "value": "Support"
      }
    ],
    "enabled": true,
    "priority": 10,
    "created_at": "2026-11-29T09:00:00Z"
  }
}

Modifier une automatisation

PATCH/v1/automations/{id}

Modifie une règle ou l’active ou la désactive. Seuls les champs envoyés changent.

Autorisationautomations:manage

Paramètres

  • idstringcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • descriptionstringcorps

    Description.

  • trigger_typeenumcorps

    Déclencheur : conversation_created, message_received, ticket_created ou ticket_resolved.

  • conditionsobjectcorps

    Conditions facultatives : keyword, channel, priority (objet JSON).

  • actionsarraycorps

    Liste de 1 à 10 actions { type, value } : assign_team, assign_member, add_tag, send_auto_reply, set_priority ou notify.

  • enabledbooleancorps

    true pour activer la règle.

  • priorityintegercorps

    low, normal, high ou urgent.

Requête
curl -X PATCH "https://unirelia.com/v1/automations/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": false
  }'
Réponse
{
  "automation": {
    "id": "f1a2b3c4-0000-4000-8000-000000000020",
    "name": "Orienter la facturation",
    "description": "",
    "trigger_type": "message_received",
    "conditions": {
      "keyword": "facture"
    },
    "actions": [
      {
        "type": "add_tag",
        "value": "Facturation"
      },
      {
        "type": "assign_team",
        "value": "Support"
      }
    ],
    "enabled": false,
    "priority": 10,
    "created_at": "2026-11-29T09:00:00Z"
  }
}

Supprimer une automatisation

DEL/v1/automations/{id}

Supprime définitivement la règle.

Autorisationautomations:manage

Paramètres

  • idstringcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/automations/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "ok": true
}

Tester une automatisation

POST/v1/automations/{id}/test

Simule la règle sur un message d’exemple et indique si ses conditions sont remplies.

Autorisationautomations:manage

Paramètres

  • idstringcheminobligatoire

    Identifiant de la ressource.

  • sample_textstringcorpsobligatoire

    Texte d’exemple à tester.

  • channelstringcorpsobligatoire

    Canal, par exemple widget.

  • prioritystringcorpsobligatoire

    low, normal, high ou urgent.

Requête
curl -X POST "https://unirelia.com/v1/automations/0e488aa4-ea43-49ad-a216-eecef28174bc/test" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sample_text": "Bonjour, j’ai une question sur ma facture",
    "channel": "widget"
  }'
Réponse
{
  "matched": true,
  "status": "success",
  "summary": "Conditions remplies : 2 actions seraient exécutées."
}

Historique d’exécution

GET/v1/automations/runs

Liste les dernières exécutions des automatisations et leur résultat.

Autorisationautomations:read

Paramètres

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/automations/runs" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "runs": [
    {
      "id": "9d8c7b6a-0000-4000-8000-000000000021",
      "automation_id": "f1a2b3c4-0000-4000-8000-000000000020",
      "status": "success",
      "summary": "Tag « Facturation » ajouté.",
      "created_at": "2026-11-29T09:30:00Z"
    }
  ]
}

Statistiques

Vue d’ensemble des statistiques

GET/v1/analytics/overview

Conversations, tickets, satisfaction, volume quotidien, performance par agent et par canal sur la période demandée.

Autorisationanalytics:read_own

Paramètres

  • daysstringrequête

    Période en jours (30 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/analytics/overview" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "days": 30,
  "conversations": {
    "total": 128,
    "open": 41,
    "closed": 70,
    "avg_first_reply_min": 7
  },
  "tickets": {
    "total": 36,
    "open": 12,
    "resolved": 22,
    "urgent": 3
  },
  "satisfaction": {
    "count": 54,
    "avg_rating": 4.6,
    "positive_pct": 91
  },
  "daily": [
    {
      "day": "2026-11-29",
      "conversations": 6,
      "tickets": 2
    }
  ],
  "agents": [
    {
      "member_id": "7c1e0a44-2b55-4c1a-9e10-6a0d5e2f1001",
      "name": "Awa Koné",
      "conversations_handled": 48,
      "tickets_resolved": 12,
      "avg_csat": 4.7
    }
  ],
  "channels": [
    {
      "channel": "widget",
      "count": 96
    }
  ]
}

Lister les avis de satisfaction

GET/v1/analytics/satisfaction

Renvoie les dernières notes de satisfaction (1 à 5) avec leur commentaire.

Autorisationanalytics:read_own

Paramètres

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/analytics/satisfaction" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "ratings": [
    {
      "id": "a9b8c7d6-0000-4000-8000-000000000030",
      "rating": 5,
      "comment": "Réponse rapide, merci.",
      "conversation_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "ticket_id": null,
      "created_at": "2026-11-29T11:00:00Z",
      "contact_name": "Aminata Diallo",
      "agent_name": "Awa Koné"
    }
  ]
}

Enregistrer un avis de satisfaction

POST/v1/analytics/satisfaction

Enregistre une note de 1 à 5 liée à une conversation, un ticket ou un contact.

Autorisationconversations:handle

Paramètres

  • conversation_idstringcorps

    Conversation concernée.

  • ticket_idstringcorps

    Ticket concerné.

  • contact_idstringcorps

    Contact concerné.

  • assigned_member_idstringcorps

    Identifiant de l’agent évalué.

  • ratingintegercorpsobligatoire

    Note de 1 à 5.

  • commentstringcorpsobligatoire

    Commentaire libre.

Requête
curl -X POST "https://unirelia.com/v1/analytics/satisfaction" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "rating": 5,
    "comment": "Réponse rapide, merci.",
    "conversation_id": "0e488aa4-ea43-49ad-a216-eecef28174bc"
  }'
Réponse
{
  "rating": {
    "id": "a9b8c7d6-0000-4000-8000-000000000030",
    "rating": 5,
    "comment": "Réponse rapide, merci.",
    "conversation_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
    "ticket_id": null,
    "created_at": "2026-11-29T11:00:00Z"
  }
}

Exporter en CSV

GET/v1/analytics/export.csv

Télécharge un export CSV : conversations (par défaut), tickets ou satisfaction.

Autorisationanalytics:read_own

Paramètres

  • typestringrequête

    conversations (par défaut), tickets ou satisfaction.

Requête
curl -X GET "https://unirelia.com/v1/analytics/export.csv" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Le corps de la réponse est le fichier lui-même, pas du JSON.

Segments

Lister les segments

GET/v1/segments

Renvoie la liste des segments de l’organisation, du plus récemment modifié au plus ancien.

Autorisationcontacts:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/segments" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "name": "Clients pro",
      "description": "",
      "match": "all",
      "filters": [
        {
          "field": "custom",
          "key": "plan",
          "op": "eq",
          "value": "pro"
        }
      ],
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un segment

POST/v1/segments

Crée un segment.

Autorisationcontacts:write

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • descriptionstringcorpsobligatoire

    Description.

  • matchenumcorpsobligatoire

    all : tous les filtres ; any : au moins un.

  • filtersarraycorpsobligatoire

    Liste de filtres { field, op, value } (10 maximum).

Requête
curl -X POST "https://unirelia.com/v1/segments" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Clients pro",
    "match": "all",
    "filters": [
      {
        "field": "custom",
        "key": "plan",
        "op": "eq",
        "value": "pro"
      }
    ]
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Clients pro",
  "description": "",
  "match": "all",
  "filters": [
    {
      "field": "custom",
      "key": "plan",
      "op": "eq",
      "value": "pro"
    }
  ],
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un segment

DEL/v1/segments/{id}

Supprime définitivement le segment.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/segments/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un segment

GET/v1/segments/{id}

Renvoie le segment à partir de son identifiant.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/segments/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Clients pro",
  "description": "",
  "match": "all",
  "filters": [
    {
      "field": "custom",
      "key": "plan",
      "op": "eq",
      "value": "pro"
    }
  ],
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un segment

PATCH/v1/segments/{id}

Modifie le segment. Seuls les champs envoyés changent.

Autorisationcontacts:write

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • descriptionstringcorps

    Description.

  • matchenumcorps

    all : tous les filtres ; any : au moins un.

  • filtersarraycorps

    Liste de filtres { field, op, value } (10 maximum).

Requête
curl -X PATCH "https://unirelia.com/v1/segments/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "match": "any"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Clients pro",
  "description": "",
  "match": "any",
  "filters": [
    {
      "field": "custom",
      "key": "plan",
      "op": "eq",
      "value": "pro"
    }
  ],
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Lister les contacts d’un segment

GET/v1/segments/{id}/contacts

Renvoie les contacts qui correspondent aux filtres du segment, évalués à chaque appel.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/segments/0e488aa4-ea43-49ad-a216-eecef28174bc/contacts" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "01066019-a34b-4475-90bf-2945d2b496a0",
      "external_id": null,
      "name": "Aminata Diallo",
      "email": "[email protected]",
      "phone": null,
      "company": "Ivoire Shop",
      "custom_fields": {
        "plan": "pro"
      },
      "last_seen_at": null,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Attributs de données

Lister les attributs de données

GET/v1/data-attributes

Renvoie la liste des attributs de données de l’organisation, du plus récemment modifié au plus ancien.

Autorisationcontacts:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

  • targetstringrequête

    Cible : contact, company ou conversation.

Requête
curl -X GET "https://unirelia.com/v1/data-attributes" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "target": "contact",
      "key": "plan",
      "label": "Formule",
      "type": "list",
      "options": [
        "free",
        "pro"
      ],
      "description": "",
      "archived": false,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un attribut de données

POST/v1/data-attributes

Crée un attribut de données.

Autorisationcontacts:manage

Paramètres

  • targetenumcorpsobligatoire

    Cible : contact, company ou conversation.

  • keystringcorpsobligatoire

    Clé technique : minuscules, chiffres et _ (2 à 40 caractères).

  • labelstringcorpsobligatoire

    Libellé affiché.

  • typeenumcorpsobligatoire

    Type de la valeur : string, number, boolean, date ou list.

  • optionsarraycorpsobligatoire

    Valeurs possibles d’une liste (50 maximum).

  • descriptionstringcorpsobligatoire

    Description.

Requête
curl -X POST "https://unirelia.com/v1/data-attributes" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "target": "contact",
    "key": "plan",
    "label": "Formule",
    "type": "list",
    "options": [
      "free",
      "pro"
    ]
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "target": "contact",
  "key": "plan",
  "label": "Formule",
  "type": "list",
  "options": [
    "free",
    "pro"
  ],
  "description": "",
  "archived": false,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un attribut de données

DEL/v1/data-attributes/{id}

Supprime définitivement l’attribut de données.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/data-attributes/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un attribut de données

GET/v1/data-attributes/{id}

Renvoie l’attribut de données à partir de son identifiant.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/data-attributes/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "target": "contact",
  "key": "plan",
  "label": "Formule",
  "type": "list",
  "options": [
    "free",
    "pro"
  ],
  "description": "",
  "archived": false,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un attribut de données

PATCH/v1/data-attributes/{id}

Modifie l’attribut de données. Seuls les champs envoyés changent.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • labelstringcorps

    Libellé affiché.

  • optionsarraycorps

    Valeurs possibles d’une liste (50 maximum).

  • descriptionstringcorps

    Description.

  • archivedbooleancorps

    true pour archiver sans supprimer.

Requête
curl -X PATCH "https://unirelia.com/v1/data-attributes/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "archived": true
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "target": "contact",
  "key": "plan",
  "label": "Formule",
  "type": "list",
  "options": [
    "free",
    "pro"
  ],
  "description": "",
  "archived": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Objets personnalisés

Lister les types d’objet personnalisé

GET/v1/custom-object-types

Renvoie la liste des types d’objet personnalisé de l’organisation, du plus récemment modifié au plus ancien.

Autorisationcontacts:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/custom-object-types" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "key": "subscription",
      "name": "Abonnement",
      "description": "",
      "attributes": [
        {
          "key": "plan",
          "label": "Formule",
          "type": "string",
          "required": true
        }
      ],
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un type d’objet personnalisé

POST/v1/custom-object-types

Crée un type d’objet personnalisé.

Autorisationcontacts:manage

Paramètres

  • keystringcorpsobligatoire

    Clé technique : minuscules, chiffres et _ (2 à 40 caractères).

  • namestringcorpsobligatoire

    Nom affiché.

  • descriptionstringcorpsobligatoire

    Description.

  • attributesarraycorpsobligatoire

    Définitions d’attributs : liste d’objets { key, label, type }.

Requête
curl -X POST "https://unirelia.com/v1/custom-object-types" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "subscription",
    "name": "Abonnement",
    "attributes": [
      {
        "key": "plan",
        "label": "Formule",
        "type": "string",
        "required": true
      }
    ]
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "key": "subscription",
  "name": "Abonnement",
  "description": "",
  "attributes": [
    {
      "key": "plan",
      "label": "Formule",
      "type": "string",
      "required": true
    }
  ],
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un type d’objet personnalisé

DEL/v1/custom-object-types/{id}

Supprime définitivement le type d’objet personnalisé.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/custom-object-types/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un type d’objet personnalisé

GET/v1/custom-object-types/{id}

Renvoie le type d’objet personnalisé à partir de son identifiant.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/custom-object-types/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "key": "subscription",
  "name": "Abonnement",
  "description": "",
  "attributes": [
    {
      "key": "plan",
      "label": "Formule",
      "type": "string",
      "required": true
    }
  ],
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un type d’objet personnalisé

PATCH/v1/custom-object-types/{id}

Modifie le type d’objet personnalisé. Seuls les champs envoyés changent.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • descriptionstringcorps

    Description.

  • attributesarraycorps

    Définitions d’attributs : liste d’objets { key, label, type }.

Requête
curl -X PATCH "https://unirelia.com/v1/custom-object-types/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Abonnement client"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "key": "subscription",
  "name": "Abonnement client",
  "description": "",
  "attributes": [
    {
      "key": "plan",
      "label": "Formule",
      "type": "string",
      "required": true
    }
  ],
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Lister les objets personnalisés

GET/v1/custom-objects/{typeKey}

Renvoie la liste des objets personnalisés de l’organisation, du plus récemment modifié au plus ancien.

Autorisationcontacts:read

Paramètres

  • typeKeystringcheminobligatoire

    Clé du type d’objet, par exemple subscription.

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/custom-objects/subscription" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "type_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "external_id": "sub-1",
      "name": "Pro annuel",
      "data": {
        "plan": "pro",
        "seats": 5
      },
      "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un objet personnalisé

POST/v1/custom-objects/{typeKey}

Crée un objet du type indiqué dans l’URL ; data est vérifié contre les attributs déclarés par le type.

Autorisationcontacts:write

Paramètres

  • typeKeystringcheminobligatoire

    Clé du type d’objet, par exemple subscription.

  • externalIdstringcorps

    Votre identifiant interne.

  • namestringcorpsobligatoire

    Nom affiché.

  • dataobjectcorpsobligatoire

    Valeurs de l’objet, vérifiées contre les attributs de son type.

  • contactIduuidcorps

    Identifiant du contact.

Requête
curl -X POST "https://unirelia.com/v1/custom-objects/subscription" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "externalId": "sub-1",
    "name": "Pro annuel",
    "data": {
      "plan": "pro",
      "seats": 5
    },
    "contactId": "01066019-a34b-4475-90bf-2945d2b496a0"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "type_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "external_id": "sub-1",
  "name": "Pro annuel",
  "data": {
    "plan": "pro",
    "seats": 5
  },
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un objet personnalisé

DEL/v1/custom-objects/{typeKey}/{id}

Supprime définitivement l’objet personnalisé.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • typeKeystringcheminobligatoire

    Clé du type d’objet, par exemple subscription.

Requête
curl -X DELETE "https://unirelia.com/v1/custom-objects/subscription/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un objet personnalisé

GET/v1/custom-objects/{typeKey}/{id}

Renvoie l’objet personnalisé à partir de son identifiant.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • typeKeystringcheminobligatoire

    Clé du type d’objet, par exemple subscription.

Requête
curl -X GET "https://unirelia.com/v1/custom-objects/subscription/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "type_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "external_id": "sub-1",
  "name": "Pro annuel",
  "data": {
    "plan": "pro",
    "seats": 5
  },
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un objet personnalisé

PATCH/v1/custom-objects/{typeKey}/{id}

Modifie l’objet personnalisé. Seuls les champs envoyés changent.

Autorisationcontacts:write

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • typeKeystringcheminobligatoire

    Clé du type d’objet, par exemple subscription.

  • externalIdstringcorps

    Votre identifiant interne.

  • namestringcorps

    Nom affiché.

  • dataobjectcorps

    Valeurs de l’objet, vérifiées contre les attributs de son type.

  • contactIdstringcorps

    Identifiant du contact.

Requête
curl -X PATCH "https://unirelia.com/v1/custom-objects/subscription/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "plan": "business",
      "seats": 20
    }
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "type_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "external_id": "sub-1",
  "name": "Pro annuel",
  "data": {
    "plan": "business",
    "seats": 20
  },
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Événements

Lister les événements

GET/v1/events

Renvoie la liste des événements de l’organisation, du plus récemment modifié au plus ancien.

Autorisationcontacts:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

  • namestringrequête

    Nom affiché.

  • contactIdstringrequête

    Identifiant du contact.

Requête
curl -X GET "https://unirelia.com/v1/events" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
      "name": "commande_payee",
      "metadata": {
        "total": 12000
      },
      "occurred_at": "2026-11-29T09:12:04Z",
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un événement

POST/v1/events

Enregistre une action d’un contact dans votre produit, par exemple commande_payee.

Autorisationcontacts:write

Paramètres

  • contactIduuidcorpsobligatoire

    Identifiant du contact.

  • namestringcorpsobligatoire

    Nom affiché.

  • metadataobjectcorpsobligatoire

    Données libres de l’événement (objet JSON).

  • occurredAtdatetimecorps

    Date de l’événement (ISO 8601), maintenant par défaut.

Requête
curl -X POST "https://unirelia.com/v1/events" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contactId": "01066019-a34b-4475-90bf-2945d2b496a0",
    "name": "commande_payee",
    "metadata": {
      "total": 12000
    }
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "name": "commande_payee",
  "metadata": {
    "total": 12000
  },
  "occurred_at": "2026-11-29T09:12:04Z",
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un événement

DEL/v1/events/{id}

Supprime définitivement l’événement.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/events/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un événement

GET/v1/events/{id}

Renvoie l’événement à partir de son identifiant.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/events/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "name": "commande_payee",
  "metadata": {
    "total": 12000
  },
  "occurred_at": "2026-11-29T09:12:04Z",
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Abonnements

Lister les types d’abonnement

GET/v1/subscription-types

Renvoie la liste des types d’abonnement de l’organisation, du plus récemment modifié au plus ancien.

Autorisationcontacts:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/subscription-types" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "key": "newsletter",
      "name": "Lettre d’information",
      "description": "",
      "channel": "email",
      "default_opt_in": true,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un type d’abonnement

POST/v1/subscription-types

Crée un type d’abonnement.

Autorisationcontacts:manage

Paramètres

  • keystringcorpsobligatoire

    Clé technique : minuscules, chiffres et _ (2 à 40 caractères).

  • namestringcorpsobligatoire

    Nom affiché.

  • descriptionstringcorpsobligatoire

    Description.

  • channelenumcorpsobligatoire

    Canal : email, sms, whatsapp ou push.

  • defaultOptInbooleancorpsobligatoire

    true : abonné par défaut tant que le contact n’a rien choisi.

Requête
curl -X POST "https://unirelia.com/v1/subscription-types" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "newsletter",
    "name": "Lettre d’information",
    "channel": "email",
    "defaultOptIn": true
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "key": "newsletter",
  "name": "Lettre d’information",
  "description": "",
  "channel": "email",
  "default_opt_in": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un type d’abonnement

DEL/v1/subscription-types/{id}

Supprime définitivement le type d’abonnement.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/subscription-types/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un type d’abonnement

GET/v1/subscription-types/{id}

Renvoie le type d’abonnement à partir de son identifiant.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/subscription-types/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "key": "newsletter",
  "name": "Lettre d’information",
  "description": "",
  "channel": "email",
  "default_opt_in": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un type d’abonnement

PATCH/v1/subscription-types/{id}

Modifie le type d’abonnement. Seuls les champs envoyés changent.

Autorisationcontacts:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • descriptionstringcorps

    Description.

  • channelenumcorps

    Canal : email, sms, whatsapp ou push.

  • defaultOptInbooleancorps

    true : abonné par défaut tant que le contact n’a rien choisi.

Requête
curl -X PATCH "https://unirelia.com/v1/subscription-types/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "defaultOptIn": false
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "key": "newsletter",
  "name": "Lettre d’information",
  "description": "",
  "channel": "email",
  "default_opt_in": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z",
  "defaultOptIn": false
}

Lire les abonnements d’un contact

GET/v1/contacts/{id}/subscriptions

Renvoie chaque type d’abonnement avec le choix du contact, ou la valeur par défaut du type tant qu’aucun choix n’est enregistré.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/contacts/0e488aa4-ea43-49ad-a216-eecef28174bc/subscriptions" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "type_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "key": "newsletter",
      "name": "Lettre d’information",
      "channel": "email",
      "opted_in": true,
      "changed_at": null
    }
  ]
}

Enregistrer le choix d’un contact

PUT/v1/contacts/{id}/subscriptions/{typeId}

Accepte ou refuse un type d’abonnement pour un contact.

Autorisationcontacts:write

Paramètres

  • typeIduuidcheminobligatoire

    Identifiant du type d’abonnement ou de ticket.

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • optedInbooleancorpsobligatoire

    true pour accepter, false pour refuser.

Requête
curl -X PUT "https://unirelia.com/v1/contacts/0e488aa4-ea43-49ad-a216-eecef28174bc/subscriptions/9a3b1c55-2d6e-4f70-8a11-0c2d4e6f8a10" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "optedIn": false
  }'
Réponse
{
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "type_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "opted_in": false
}

Types et statuts de ticket

Lister les types de ticket

GET/v1/ticket-types

Renvoie la liste des types de ticket de l’organisation, du plus récemment modifié au plus ancien.

Autorisationtickets:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/ticket-types" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "name": "Incident",
      "description": "",
      "attributes": [
        {
          "key": "severite",
          "label": "Sévérité",
          "type": "list",
          "options": [
            "mineure",
            "majeure"
          ]
        }
      ],
      "archived": false,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un type de ticket

POST/v1/ticket-types

Crée un type de ticket.

Autorisationtickets:manage

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • descriptionstringcorpsobligatoire

    Description.

  • attributesarraycorpsobligatoire

    Définitions d’attributs : liste d’objets { key, label, type }.

Requête
curl -X POST "https://unirelia.com/v1/ticket-types" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Incident",
    "attributes": [
      {
        "key": "severite",
        "label": "Sévérité",
        "type": "list",
        "options": [
          "mineure",
          "majeure"
        ]
      }
    ]
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Incident",
  "description": "",
  "attributes": [
    {
      "key": "severite",
      "label": "Sévérité",
      "type": "list",
      "options": [
        "mineure",
        "majeure"
      ]
    }
  ],
  "archived": false,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un type de ticket

DEL/v1/ticket-types/{id}

Supprime définitivement le type de ticket.

Autorisationtickets:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/ticket-types/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un type de ticket

GET/v1/ticket-types/{id}

Renvoie le type de ticket à partir de son identifiant.

Autorisationtickets:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/ticket-types/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Incident",
  "description": "",
  "attributes": [
    {
      "key": "severite",
      "label": "Sévérité",
      "type": "list",
      "options": [
        "mineure",
        "majeure"
      ]
    }
  ],
  "archived": false,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un type de ticket

PATCH/v1/ticket-types/{id}

Modifie le type de ticket. Seuls les champs envoyés changent.

Autorisationtickets:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • descriptionstringcorps

    Description.

  • attributesarraycorps

    Définitions d’attributs : liste d’objets { key, label, type }.

  • archivedbooleancorps

    true pour archiver sans supprimer.

Requête
curl -X PATCH "https://unirelia.com/v1/ticket-types/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "archived": true
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Incident",
  "description": "",
  "attributes": [
    {
      "key": "severite",
      "label": "Sévérité",
      "type": "list",
      "options": [
        "mineure",
        "majeure"
      ]
    }
  ],
  "archived": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Lister les statuts de ticket

GET/v1/ticket-states

Renvoie la liste des statuts de ticket de l’organisation, du plus récemment modifié au plus ancien.

Autorisationtickets:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/ticket-states" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "name": "En attente du client",
      "category": "pending",
      "sort_order": 10,
      "is_default": false,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un statut de ticket

POST/v1/ticket-states

Crée un statut rattaché à une catégorie (open, pending, resolved ou closed) qui détermine le statut réel des tickets.

Autorisationtickets:manage

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • categoryenumcorpsobligatoire

    Catégorie : open, pending, resolved ou closed.

  • sortOrderintegercorpsobligatoire

    Ordre d’affichage, de 0 à 999.

  • isDefaultbooleancorpsobligatoire

    true pour en faire l’élément par défaut ; il remplace l’ancien.

Requête
curl -X POST "https://unirelia.com/v1/ticket-states" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "En attente du client",
    "category": "pending",
    "sortOrder": 10
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "En attente du client",
  "category": "pending",
  "sort_order": 10,
  "is_default": false,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un statut de ticket

DEL/v1/ticket-states/{id}

Supprime définitivement le statut de ticket.

Autorisationtickets:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/ticket-states/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un statut de ticket

GET/v1/ticket-states/{id}

Renvoie le statut de ticket à partir de son identifiant.

Autorisationtickets:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/ticket-states/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "En attente du client",
  "category": "pending",
  "sort_order": 10,
  "is_default": false,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un statut de ticket

PATCH/v1/ticket-states/{id}

Modifie le statut de ticket. Seuls les champs envoyés changent.

Autorisationtickets:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • categoryenumcorps

    Catégorie : open, pending, resolved ou closed.

  • sortOrderintegercorps

    Ordre d’affichage, de 0 à 999.

  • isDefaultbooleancorps

    true pour en faire l’élément par défaut ; il remplace l’ancien.

Requête
curl -X PATCH "https://unirelia.com/v1/ticket-states/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sortOrder": 20
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "En attente du client",
  "category": "pending",
  "sort_order": 10,
  "is_default": false,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z",
  "sortOrder": 20
}

Heures d’ouverture

Lister les horaires d’ouverture

GET/v1/office-hours

Renvoie la liste des horaires d’ouverture de l’organisation, du plus récemment modifié au plus ancien.

Autorisationconversations:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/office-hours" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "name": "Horaires Abidjan",
      "timezone": "Africa/Abidjan",
      "schedule": {
        "mon": [
          {
            "start": "09:00",
            "end": "18:00"
          }
        ],
        "tue": [
          {
            "start": "09:00",
            "end": "18:00"
          }
        ]
      },
      "away_message": "Nous revenons demain.",
      "is_default": true,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un horaire d’ouverture

POST/v1/office-hours

Crée un horaire hebdomadaire dans un fuseau. Un seul horaire peut être celui par défaut.

Autorisationsettings:manage

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • timezonestringcorpsobligatoire

    Fuseau IANA, par exemple Africa/Abidjan.

  • scheduleobjectcorpsobligatoire

    Plages par jour : mon à sun, chacune une liste de { start, end } au format HH:MM.

  • awayMessagestringcorpsobligatoire

    Message affiché hors des heures d’ouverture.

  • isDefaultbooleancorpsobligatoire

    true pour en faire l’élément par défaut ; il remplace l’ancien.

Requête
curl -X POST "https://unirelia.com/v1/office-hours" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Horaires Abidjan",
    "timezone": "Africa/Abidjan",
    "schedule": {
      "mon": [
        {
          "start": "09:00",
          "end": "18:00"
        }
      ],
      "tue": [
        {
          "start": "09:00",
          "end": "18:00"
        }
      ]
    },
    "awayMessage": "Nous revenons demain.",
    "isDefault": true
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Horaires Abidjan",
  "timezone": "Africa/Abidjan",
  "schedule": {
    "mon": [
      {
        "start": "09:00",
        "end": "18:00"
      }
    ],
    "tue": [
      {
        "start": "09:00",
        "end": "18:00"
      }
    ]
  },
  "away_message": "Nous revenons demain.",
  "is_default": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un horaire d’ouverture

DEL/v1/office-hours/{id}

Supprime définitivement l’horaire d’ouverture.

Autorisationsettings:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/office-hours/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un horaire d’ouverture

GET/v1/office-hours/{id}

Renvoie l’horaire d’ouverture à partir de son identifiant.

Autorisationconversations:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/office-hours/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Horaires Abidjan",
  "timezone": "Africa/Abidjan",
  "schedule": {
    "mon": [
      {
        "start": "09:00",
        "end": "18:00"
      }
    ],
    "tue": [
      {
        "start": "09:00",
        "end": "18:00"
      }
    ]
  },
  "away_message": "Nous revenons demain.",
  "is_default": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un horaire d’ouverture

PATCH/v1/office-hours/{id}

Modifie l’horaire d’ouverture. Seuls les champs envoyés changent.

Autorisationsettings:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • timezonestringcorps

    Fuseau IANA, par exemple Africa/Abidjan.

  • scheduleobjectcorps

    Plages par jour : mon à sun, chacune une liste de { start, end } au format HH:MM.

  • awayMessagestringcorps

    Message affiché hors des heures d’ouverture.

  • isDefaultbooleancorps

    true pour en faire l’élément par défaut ; il remplace l’ancien.

Requête
curl -X PATCH "https://unirelia.com/v1/office-hours/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "awayMessage": "Nous répondons dès 9 h."
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Horaires Abidjan",
  "timezone": "Africa/Abidjan",
  "schedule": {
    "mon": [
      {
        "start": "09:00",
        "end": "18:00"
      }
    ],
    "tue": [
      {
        "start": "09:00",
        "end": "18:00"
      }
    ]
  },
  "away_message": "Nous revenons demain.",
  "is_default": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z",
  "awayMessage": "Nous répondons dès 9 h."
}

Savoir si l’équipe est ouverte

GET/v1/office-hours/status

Indique si l’équipe est ouverte maintenant, dans le fuseau de l’horaire demandé ou de l’horaire par défaut.

Autorisationconversations:read

Paramètres

  • idstringrequête

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/office-hours/status" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "office_hours_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Horaires Abidjan",
  "timezone": "Africa/Abidjan",
  "open": false,
  "local_time": "21:42",
  "away_message": "Nous revenons demain."
}

Marques

Lister les marques

GET/v1/brands

Renvoie la liste des marques de l’organisation, du plus récemment modifié au plus ancien.

Autorisationconversations:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/brands" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "name": "Atlas",
      "website": "https://atlas.example",
      "logo_url": null,
      "primary_color": "#1463ff",
      "support_email": "[email protected]",
      "is_default": true,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer une marque

POST/v1/brands

Crée une marque.

Autorisationsettings:manage

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • websitestringcorps

    Adresse du site.

  • logoUrlstringcorps

    Adresse du logo (https).

  • primaryColorstringcorpsobligatoire

    Couleur hexadécimale, par exemple #1463ff.

  • supportEmailstringcorps

    Adresse e-mail de support.

  • isDefaultbooleancorpsobligatoire

    true pour en faire l’élément par défaut ; il remplace l’ancien.

Requête
curl -X POST "https://unirelia.com/v1/brands" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Atlas",
    "primaryColor": "#1463ff",
    "supportEmail": "[email protected]",
    "isDefault": true
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Atlas",
  "website": "https://atlas.example",
  "logo_url": null,
  "primary_color": "#1463ff",
  "support_email": "[email protected]",
  "is_default": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer une marque

DEL/v1/brands/{id}

Supprime définitivement la marque.

Autorisationsettings:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/brands/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire une marque

GET/v1/brands/{id}

Renvoie la marque à partir de son identifiant.

Autorisationconversations:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/brands/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Atlas",
  "website": "https://atlas.example",
  "logo_url": null,
  "primary_color": "#1463ff",
  "support_email": "[email protected]",
  "is_default": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier une marque

PATCH/v1/brands/{id}

Modifie la marque. Seuls les champs envoyés changent.

Autorisationsettings:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • websitestringcorps

    Adresse du site.

  • logoUrlstringcorps

    Adresse du logo (https).

  • primaryColorstringcorps

    Couleur hexadécimale, par exemple #1463ff.

  • supportEmailstringcorps

    Adresse e-mail de support.

  • isDefaultbooleancorps

    true pour en faire l’élément par défaut ; il remplace l’ancien.

Requête
curl -X PATCH "https://unirelia.com/v1/brands/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "primaryColor": "#0b3fa8"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Atlas",
  "website": "https://atlas.example",
  "logo_url": null,
  "primary_color": "#1463ff",
  "support_email": "[email protected]",
  "is_default": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z",
  "primaryColor": "#0b3fa8"
}

Dossiers

Lister les dossiers

GET/v1/folders

Renvoie la liste des dossiers de l’organisation, du plus récemment modifié au plus ancien.

Autorisationarticles:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/folders" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "name": "Procédures",
      "parent_id": null,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un dossier

POST/v1/folders

Crée un dossier.

Autorisationarticles:manage

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • parentIdstringcorps

    Dossier parent, ou null pour la racine.

Requête
curl -X POST "https://unirelia.com/v1/folders" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Procédures"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Procédures",
  "parent_id": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un dossier

DEL/v1/folders/{id}

Supprime définitivement le dossier.

Autorisationarticles:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/folders/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un dossier

GET/v1/folders/{id}

Renvoie le dossier à partir de son identifiant.

Autorisationarticles:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/folders/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Procédures",
  "parent_id": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un dossier

PATCH/v1/folders/{id}

Modifie le dossier. Seuls les champs envoyés changent.

Autorisationarticles:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorps

    Nom affiché.

  • parentIdstringcorps

    Dossier parent, ou null pour la racine.

Requête
curl -X PATCH "https://unirelia.com/v1/folders/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Procédures internes"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "name": "Procédures internes",
  "parent_id": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Articles internes

Lister les articles internes

GET/v1/internal-articles

Renvoie la liste des articles internes de l’organisation, du plus récemment modifié au plus ancien.

Autorisationarticles:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

  • folderIdstringrequête

    Dossier de l’article.

Requête
curl -X GET "https://unirelia.com/v1/internal-articles" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "folder_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "title": "Rembourser une commande",
      "body": "Étapes réservées à l’équipe…",
      "status": "published",
      "author_id": null,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer un article interne

POST/v1/internal-articles

Crée un article interne.

Autorisationarticles:manage

Paramètres

  • folderIdstringcorps

    Dossier de l’article.

  • titlestringcorpsobligatoire

    Titre.

  • bodystringcorpsobligatoire

    Contenu du texte.

  • statusenumcorpsobligatoire

    Statut de la ressource.

Requête
curl -X POST "https://unirelia.com/v1/internal-articles" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "folderId": "0e488aa4-ea43-49ad-a216-eecef28174bc",
    "title": "Rembourser une commande",
    "body": "Étapes réservées à l’équipe…",
    "status": "published"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "folder_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "title": "Rembourser une commande",
  "body": "Étapes réservées à l’équipe…",
  "status": "published",
  "author_id": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer un article interne

DEL/v1/internal-articles/{id}

Supprime définitivement l’article interne.

Autorisationarticles:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/internal-articles/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire un article interne

GET/v1/internal-articles/{id}

Renvoie l’article interne à partir de son identifiant.

Autorisationarticles:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/internal-articles/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "folder_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "title": "Rembourser une commande",
  "body": "Étapes réservées à l’équipe…",
  "status": "published",
  "author_id": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier un article interne

PATCH/v1/internal-articles/{id}

Modifie l’article interne. Seuls les champs envoyés changent.

Autorisationarticles:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • folderIdstringcorps

    Dossier de l’article.

  • titlestringcorps

    Titre.

  • bodystringcorps

    Contenu du texte.

  • statusenumcorps

    Statut de la ressource.

Requête
curl -X PATCH "https://unirelia.com/v1/internal-articles/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "draft"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "folder_id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "title": "Rembourser une commande",
  "body": "Étapes réservées à l’équipe…",
  "status": "draft",
  "author_id": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Actualités

Lister les actualités

GET/v1/news

Renvoie la liste des actualités de l’organisation, du plus récemment modifié au plus ancien.

Autorisationarticles:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

  • statusstringrequête

    Statut de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/news" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "title": "Nouveau widget",
      "body": "Le widget gagne un thème sombre.",
      "status": "published",
      "published_at": "2026-11-29T09:12:04Z",
      "author_id": null,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer une actualité

POST/v1/news

Crée une actualité.

Autorisationarticles:manage

Paramètres

  • titlestringcorpsobligatoire

    Titre.

  • bodystringcorpsobligatoire

    Contenu du texte.

  • statusenumcorpsobligatoire

    Statut de la ressource.

Requête
curl -X POST "https://unirelia.com/v1/news" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Nouveau widget",
    "body": "Le widget gagne un thème sombre.",
    "status": "published"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "title": "Nouveau widget",
  "body": "Le widget gagne un thème sombre.",
  "status": "published",
  "published_at": "2026-11-29T09:12:04Z",
  "author_id": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer une actualité

DEL/v1/news/{id}

Supprime définitivement l’actualité.

Autorisationarticles:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/news/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire une actualité

GET/v1/news/{id}

Renvoie l’actualité à partir de son identifiant.

Autorisationarticles:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/news/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "title": "Nouveau widget",
  "body": "Le widget gagne un thème sombre.",
  "status": "published",
  "published_at": "2026-11-29T09:12:04Z",
  "author_id": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier une actualité

PATCH/v1/news/{id}

Modifie l’actualité. Seuls les champs envoyés changent.

Autorisationarticles:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • titlestringcorps

    Titre.

  • bodystringcorps

    Contenu du texte.

  • statusenumcorps

    Statut de la ressource.

Requête
curl -X PATCH "https://unirelia.com/v1/news/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "archived"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "title": "Nouveau widget",
  "body": "Le widget gagne un thème sombre.",
  "status": "archived",
  "published_at": "2026-11-29T09:12:04Z",
  "author_id": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Plages IP autorisées

Lister les plages IP autorisées

GET/v1/ip-allowlist

Renvoie la liste des plages IP autorisées de l’organisation, du plus récemment modifié au plus ancien.

Autorisationsettings:manage

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

Requête
curl -X GET "https://unirelia.com/v1/ip-allowlist" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "cidr": "203.0.113.0/24",
      "label": "Bureau",
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Créer une plage IP autorisée

POST/v1/ip-allowlist

Autorise une plage IP (CIDR). Dès qu’une plage existe, les appels par clé API depuis une autre adresse reçoivent un 403 ; les sessions de l’application ne sont pas concernées.

Autorisationsettings:manage

Paramètres

  • cidrstringcorpsobligatoire

    Plage IP au format CIDR, par exemple 203.0.113.0/24.

  • labelstringcorpsobligatoire

    Libellé affiché.

Requête
curl -X POST "https://unirelia.com/v1/ip-allowlist" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cidr": "203.0.113.0/24",
    "label": "Bureau"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "cidr": "203.0.113.0/24",
  "label": "Bureau",
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Supprimer une plage IP autorisée

DEL/v1/ip-allowlist/{id}

Supprime définitivement la plage IP autorisée.

Autorisationsettings:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/ip-allowlist/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Lire une plage IP autorisée

GET/v1/ip-allowlist/{id}

Renvoie la plage IP autorisée à partir de son identifiant.

Autorisationsettings:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/ip-allowlist/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "cidr": "203.0.113.0/24",
  "label": "Bureau",
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Modifier une plage IP autorisée

PATCH/v1/ip-allowlist/{id}

Modifie la plage IP autorisée. Seuls les champs envoyés changent.

Autorisationsettings:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • cidrstringcorps

    Plage IP au format CIDR, par exemple 203.0.113.0/24.

  • labelstringcorps

    Libellé affiché.

Requête
curl -X PATCH "https://unirelia.com/v1/ip-allowlist/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Bureau Abidjan"
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "cidr": "203.0.113.0/24",
  "label": "Bureau Abidjan",
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Tâches asynchrones

Lancer une tâche asynchrone

POST/v1/jobs

Crée une tâche d’export (contacts_export) ou d’import (contacts_import, 1 000 lignes maximum), traitée en arrière-plan. Suivez son statut avec GET /v1/jobs/{id}.

Autorisationcontacts:manage

Paramètres

  • typeenumcorpsobligatoire

    export (contacts_export) ou import (contacts_import) de contacts.

  • payloadobjectcorpsobligatoire

    Options de la tâche : q (filtre d’export) ou rows (import, 1 000 lignes).

Requête
curl -X POST "https://unirelia.com/v1/jobs" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "contacts_export",
    "payload": {
      "q": "ivoire"
    }
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "type": "contacts_export",
  "status": "queued",
  "summary": {},
  "error": null,
  "started_at": null,
  "finished_at": null,
  "has_result": false,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Lister les tâches

GET/v1/jobs

Renvoie les tâches de l’organisation, de la plus récente à la plus ancienne.

Autorisationcontacts:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

  • statusstringrequête

    Statut de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/jobs" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "type": "contacts_export",
      "status": "succeeded",
      "summary": {
        "rows": 128
      },
      "error": null,
      "started_at": "2026-11-29T09:12:05Z",
      "finished_at": "2026-11-29T09:12:07Z",
      "has_result": true,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Lire une tâche

GET/v1/jobs/{id}

Renvoie le statut (queued, running, succeeded ou failed) et le résumé d’une tâche.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/jobs/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "type": "contacts_export",
  "status": "succeeded",
  "summary": {
    "rows": 128
  },
  "error": null,
  "started_at": "2026-11-29T09:12:05Z",
  "finished_at": "2026-11-29T09:12:07Z",
  "has_result": true,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Télécharger le résultat d’une tâche

GET/v1/jobs/{id}/result

Renvoie le fichier CSV d’un export terminé.

Autorisationcontacts:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/jobs/0e488aa4-ea43-49ad-a216-eecef28174bc/result" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Le corps de la réponse est le fichier lui-même, pas du JSON.

Messages sortants

Envoyer un message sortant

POST/v1/outbound-messages

Ouvre une conversation avec le contact et y publie votre message au nom de l’équipe. Aucun e-mail ni SMS n’est envoyé par cette route.

Autorisationconversations:handle

Paramètres

  • contactIduuidcorpsobligatoire

    Identifiant du contact.

  • subjectstringcorpsobligatoire

    Objet.

  • bodystringcorpsobligatoire

    Contenu du texte.

Requête
curl -X POST "https://unirelia.com/v1/outbound-messages" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contactId": "01066019-a34b-4475-90bf-2945d2b496a0",
    "subject": "Votre commande",
    "body": "Bonne nouvelle : votre colis est parti."
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "conversation_id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
  "subject": "Votre commande",
  "body": "Bonne nouvelle : votre colis est parti.",
  "status": "sent",
  "error": null,
  "created_by": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Lister les messages sortants

GET/v1/outbound-messages

Renvoie les messages sortants, filtrables par contact.

Autorisationconversations:read

Paramètres

  • page_tokenstringrequête

    Jeton next_page_token de la réponse précédente.

  • limitintegerrequête

    Nombre d’éléments, de 1 à 100 (50 par défaut).

  • contactIdstringrequête

    Identifiant du contact.

Requête
curl -X GET "https://unirelia.com/v1/outbound-messages" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
      "conversation_id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
      "subject": "Votre commande",
      "body": "Bonne nouvelle : votre colis est parti.",
      "status": "sent",
      "error": null,
      "created_by": null,
      "created_at": "2026-11-29T09:12:04Z",
      "updated_at": "2026-11-29T09:12:04Z"
    }
  ],
  "next_page_token": null
}

Lire un message sortant

GET/v1/outbound-messages/{id}

Renvoie un message sortant et la conversation qu’il a ouverte.

Autorisationconversations:read

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X GET "https://unirelia.com/v1/outbound-messages/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "contact_id": "01066019-a34b-4475-90bf-2945d2b496a0",
  "conversation_id": "5e673519-9f4e-4fc6-9aa9-9881c88121f6",
  "subject": "Votre commande",
  "body": "Bonne nouvelle : votre colis est parti.",
  "status": "sent",
  "error": null,
  "created_by": null,
  "created_at": "2026-11-29T09:12:04Z",
  "updated_at": "2026-11-29T09:12:04Z"
}

Agent UN

État de l’agent UN

GET/v1/un/agent

Indique ce que UN sait faire aujourd’hui : suggérer des articles publiés, sans réponse générée ni envoi automatique.

Autorisationconversations:read

Requête
curl -X GET "https://unirelia.com/v1/un/agent" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "name": "UN",
  "mode": "suggestions",
  "article_suggestions": true,
  "generated_replies": false,
  "auto_send": false,
  "published_articles": 12
}

Suggérer des articles

POST/v1/un/suggestions

Renvoie les articles publiés les plus proches d’un message. Rien n’est envoyé : c’est votre équipe qui choisit.

Autorisationconversations:handle

Paramètres

  • textstringcorpsobligatoire

    Texte du message à analyser (3 à 500 caractères).

  • limitintegercorpsobligatoire

    Nombre d’articles, de 1 à 5 (3 par défaut).

Requête
curl -X POST "https://unirelia.com/v1/un/suggestions" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Bonjour, je voudrais un remboursement de ma commande",
    "limit": 3
  }'
Réponse
{
  "keywords": [
    "remboursement",
    "commande"
  ],
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "title": "Rembourser une commande",
      "slug": "rembourser-une-commande",
      "summary": "Procédure de remboursement.",
      "score": 5
    }
  ]
}

Rôles

Lister les rôles

GET/v1/roles

Renvoie la liste des rôles de l’organisation, du plus récemment modifié au plus ancien.

Autorisationmembers:read

Requête
curl -X GET "https://unirelia.com/v1/roles" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
{
  "data": [
    {
      "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
      "key": "support-n2",
      "name": "Support niveau 2",
      "permissions": [
        "conversations:handle",
        "tickets:handle"
      ],
      "is_system": false,
      "member_count": 3
    }
  ],
  "next_page_token": null
}

Créer un rôle personnalisé

POST/v1/roles

Crée un rôle personnalisé.

Autorisationroles:manage

Paramètres

  • namestringcorpsobligatoire

    Nom affiché.

  • permissionsarraycorpsobligatoire

    Liste de permissions, par exemple conversations:handle.

Requête
curl -X POST "https://unirelia.com/v1/roles" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support niveau 2",
    "permissions": [
      "conversations:handle",
      "tickets:handle"
    ]
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "key": "support-n2",
  "name": "Support niveau 2",
  "permissions": [
    "conversations:handle",
    "tickets:handle"
  ],
  "is_system": false,
  "member_count": 3
}

Supprimer un rôle personnalisé

DEL/v1/roles/{id}

Supprime définitivement le rôle personnalisé.

Autorisationroles:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

Requête
curl -X DELETE "https://unirelia.com/v1/roles/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY"
Réponse
Réponse vide (204)

Modifier un rôle personnalisé

PATCH/v1/roles/{id}

Modifie le rôle personnalisé. Seuls les champs envoyés changent.

Autorisationroles:manage

Paramètres

  • iduuidcheminobligatoire

    Identifiant de la ressource.

  • namestringcorpsobligatoire

    Nom affiché.

  • permissionsarraycorpsobligatoire

    Liste de permissions, par exemple conversations:handle.

Requête
curl -X PATCH "https://unirelia.com/v1/roles/0e488aa4-ea43-49ad-a216-eecef28174bc" \
  -H "Authorization: Bearer $UNIRELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support niveau 2",
    "permissions": [
      "conversations:handle",
      "tickets:handle",
      "contacts:read"
    ]
  }'
Réponse
{
  "id": "0e488aa4-ea43-49ad-a216-eecef28174bc",
  "key": "support-n2",
  "name": "Support niveau 2",
  "permissions": [
    "conversations:handle",
    "tickets:handle",
    "contacts:read"
  ],
  "is_system": false,
  "member_count": 3
}
Spécification OpenAPI (JSON)© UNIRELIA