API développeurs v2.1

Intégrez Nonli avec une référence API claire et prête pour les IA.

Utilisez les tokens API, recherchez les posts et les données de listening, créez des shortlinks, publiez des posts et uploadez des vidéos depuis une documentation unique.

URL de base

https://api.nonli.com/v2.1
57endpoints
9ressources

Démarrage rapide

Trois réflexes suffisent pour authentifier vos appels, limiter les payloads et interroger les données de production proprement.

bash
1curl --location 'https://api.nonli.com/v2.1/brands?size=1&fields=id,name' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
1

Créez un token API

Les administrateurs de société créent et renouvellent les tokens API depuis le back office Nonli.

2

Envoyez le header Bearer

Envoyez le token sur chaque appel authentifié avec Authorization: Bearer YOUR_API_TOKEN. Pour valider un token, appelez l’endpoint brands affiché ici.

3

Demandez les champs utiles

Utilisez fields, filters, filtersOr, excludes, size, page et sort pour garder des réponses compactes, pour les apps comme pour les agents IA.

Notes pour intégration IA

OpenAPI JSON: /api-docs/openapi.json

llms.txt: /llms.txt

  • Préférez /api-docs/openapi.json pour générer des outils et extraire les schémas.
  • Utilisez /llms.txt comme point d’entrée compact et crawlable.
  • Les tokens API sont des identifiants de rôle société, pas des sessions utilisateur web : n’utilisez pas /me avec des tokens Bearer.
  • Ajoutez fields dès que possible pour réduire l’usage de tokens.
  • Respectez les rate limits et parcourez les gros jeux de données avec size/page.

Explorateur d’endpoints

57 endpoints

GETSearch brands/brandsOuvrirGETGet a brand/brands/:brandIdOuvrirGETSearch social accounts/social-accountsOuvrirGETGet a social account/social-accounts/:socialAccountIdOuvrirGETGet publishing quota/social-accounts/publishing-quotaOuvrirGETGet YouTube playlists/social-accounts/youtube/playlistsOuvrirGETGet Pinterest boards/social-accounts/pinterest/boardsOuvrirGETSearch posts/postsOuvrirGETGet a post/posts/:postIdOuvrirGETGet post categories/posts/categoriesOuvrirGETGet post brands/posts/brandsOuvrirGETGet post users/posts/usersOuvrirGETGet post languages/posts/languagesOuvrirGETGet post histogram/posts/histogramOuvrirGETGet post aggregation/posts/aggregationOuvrirGETGet post stats/posts/statsOuvrirPOSTCheck post content/posts/checkOuvrirGETGet post tags/posts/tagsOuvrirGETGet post topics/posts/topicsOuvrirPOSTCreate posts in bulk/posts/bulkOuvrirPUTUpdate posts in bulk/posts/bulkOuvrirDELETEDelete posts in bulk/posts/bulkOuvrirGETSearch shortlinks/shortlinksOuvrirGETGet a shortlink/shortlinks/:shortlinkIdOuvrirGETGet shortlink stats/shortlinks/statsOuvrirGETGet shortlink authors/shortlinks/authorsOuvrirGETGet shortlink brands/shortlinks/brandsOuvrirPOSTCreate a shortlink/shortlinksOuvrirPOSTCreate shortlinks in bulk/shortlinks/bulkOuvrirPUTUpdate a shortlink/shortlinks/:shortlinkIdOuvrirPOSTGenerate a message for a shortlink/shortlinks/:shortlinkId/generate-messageOuvrirGETGet social listening/listening/socialOuvrirGETGet organic listening/listening/organicOuvrirGETGet organic content/listening/organic/:organicIdOuvrirGETGet organic stats/listening/organic/statsOuvrirGETGet organic aggregation/listening/organic/aggregationOuvrirGETSuggest organic filter values/listening/organic/suggest/:fieldOuvrirGETSearch themes/themesOuvrirGETGet a theme/themes/:themeIdOuvrirPOSTCreate a theme/themesOuvrirPUTUpdate a theme/themes/:themeIdOuvrirDELETEDelete a theme/themes/:themeIdOuvrirGETGet theme roles/themes/rolesOuvrirGETSearch bots/botsOuvrirGETGet a bot/bots/:botIdOuvrirPOSTCreate bots in bulk/bots/bulkOuvrirPUTUpdate bots in bulk/bots/bulkOuvrirDELETEDelete a bot/bots/:botIdOuvrirGETGet bot configuration info/bots/infoOuvrirGETSearch media/mediaOuvrirGETGet media tags/media/tagsOuvrirPOSTUpload an image/upload/imageOuvrirPOSTCreate upload video token/upload/video/tokenOuvrirPOSTCheck uploaded video existence/upload/video/existsOuvrirPOSTUpload video chunk/upload/video/chunkOuvrirPOSTCreate upload document token/upload/document/tokenOuvrirPOSTUpload document chunk/upload/document/chunkOuvrir

Parcours d’intégration courants

5 endpoints
Sur cette page

1.Conventions

Règles communes à tous les endpoints.

Authentification

Envoyez un token API dans le header Authorization à chaque appel authentifié : Authorization: Bearer YOUR_API_TOKEN. Les tokens API représentent un rôle société, pas une session utilisateur web, donc /me n’est pas disponible avec les tokens Bearer. Conservez-les de façon sécurisée, renouvelez-les depuis le back office et ne les mettez jamais dans les query strings.

Pagination

Les endpoints de liste renvoient total et un tableau rows. Parcourez les résultats avec size et un page indexé à zéro jusqu’à récupérer total éléments. Utilisez fields pour garder chaque élément compact.

Dates et fuseaux horaires

Les dates sont en UTC au format ISO-8601, par exemple 2026-05-27T23:59:59Z. Les filtres de plage utilisent ".." entre deux valeurs, par exemple publishedAt:-30 days..now.

Identifiants

Les posts, shortlinks et contenus organic utilisent des UUID (string). Les brands, comptes sociaux et thèmes utilisent des ID entiers. Transmettez les identifiants tels que l’API les renvoie.

2.Paramètres de recherche

La plupart des endpoints de liste partagent la même grammaire de requête.

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
pageintZero-based page number.Défaut: 0
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
sortstringSort expression. Prefix a field with "-" for descending order.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
fieldsstringComma-separated fields to include in each returned item.
existsstringComma-separated fields that must exist in each returned item.

3.Erreurs

Basez votre gestion sur le code HTTP plutôt que sur le texte du message. Les codes gardent leur sens HTTP standard.

StatutSignification
200OKLa requête a réussi.
400Requête invalideLe body ou les paramètres sont mal formés ou échouent à la validation.
401Non authentifiéLe token Bearer du header Authorization est absent ou invalide. Vérifiez la valeur du token ou renouvelez-le depuis le back office avant de rejouer l’appel.
403InterditLe token API est valide mais n’a pas les droits sur cette ressource.
404IntrouvableLa ressource n’existe pas ou n’est pas visible par votre société.
429Trop de requêtesUne limite de débit a été atteinte. Ralentissez et réessayez plus tard.
500Erreur serveurErreur serveur inattendue. Réessayez les lectures idempotentes avec un backoff.

Les réponses d’erreur renvoient un body JSON décrivant le problème, mais c’est le code HTTP qui fait foi : construisez votre gestion d’erreurs autour du code, pas du texte du message.

Bonnes pratiques de gestion

  • Traitez tout statut non-2xx comme un échec et lisez le body JSON pour le contexte.
  • Sur 401, vérifiez la valeur du token API, renouvelez-le si nécessaire, puis rejouez la requête.
  • Sur 429, attendez avant de réessayer, et respectez un header Retry-After s’il est présent.
  • Sur 5xx, réessayez les lectures idempotentes avec un backoff exponentiel.

Référence

4.Brands

2 endpoints

Read the brands attached to the authenticated company. Brand IDs are required by publishing and shortlink workflows.

GET/brands/:brandIdBearer requis

4.2.Get a brand

Return one brand with optional embedded configuration used for publishing, shortlinks, smart images, and URL parameters.

Paramètres query

ChampTypeDescription
fieldsstringComma-separated fields to include.
embedstringCan embed urlParameters, domains, geoblocking, smart image configs, smart message configs, and URLs to stalk.

Champs retournés

ChampTypeDescription
idintUnique brand ID.
namestringBrand name.
shortDomainstringBrand short domain.
domainsBrandDomain[]Configured brand domains when embedded.
urlParametersobject[]URL parameter configuration when embedded.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/brands/1?fields=id,name,shortDomain&embed=domains,urlParameters' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'

5.Social accounts

5 endpoints

Read connected social accounts and quota data required before creating or scheduling posts.

GET/social-accounts/:socialAccountIdBearer requis

5.2.Get a social account

Return one connected social account with publishing metadata.

Paramètres query

ChampTypeDescription
fieldsstringComma-separated fields to include.

Champs retournés

ChampTypeDescription
idintSocial account ID.
externalIdstringSocial network account/page ID.
namestringAccount display name.
typestringNetwork type.
brandIdintAssociated brand ID.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/social-accounts/42?fields=id,name,type,externalId,brandId' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/social-accounts/publishing-quotaBearer requis

5.3.Get publishing quota

Return publishing quota information for selected social accounts before scheduling posts.

Paramètres query

ChampTypeDescription
socialAccountsstringComma-separated social account IDs or formatted account descriptors.

Champs retournés

ChampTypeDescription
quotaobjectQuota information grouped by account or network.
usageobjectCurrent usage grouped by account or network.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/social-accounts/publishing-quota?socialAccounts=42,43' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/social-accounts/youtube/playlistsBearer requis

5.4.Get YouTube playlists

Return YouTube playlists for connected YouTube social accounts.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
pageintZero-based page number.Défaut: 0
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
sortstringSort expression. Prefix a field with "-" for descending order.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
fieldsstringComma-separated fields to include in each returned item.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
totalintTotal number of playlists found.
rowsobject[]YouTube playlists available for publishing options.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/social-accounts/youtube/playlists?filters=socialAccountId:42&size=50' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/social-accounts/pinterest/boardsBearer requis

5.5.Get Pinterest boards

Return Pinterest boards for connected Pinterest social accounts.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
pageintZero-based page number.Défaut: 0
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
sortstringSort expression. Prefix a field with "-" for descending order.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
fieldsstringComma-separated fields to include in each returned item.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
totalintTotal number of boards found.
rowsobject[]Pinterest boards available for publishing options.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/social-accounts/pinterest/boards?filters=socialAccountId:42&size=50' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'

6.Posts

15 endpoints

Search, create, update, and delete social posts. Bulk write endpoints accept arrays so integrations can synchronize several posts at once.

GET/posts/:postIdBearer requis

6.2.Get a post

Return one post by ID with optional filters and field selection.

Paramètres query

ChampTypeDescription
fieldsstringComma-separated fields to include.
filtersstringOptional filters used to optimize lookup, such as createdAt.
embedstringOptional related data to embed.

Champs retournés

ChampTypeDescription
idstringPost ID.
createdAtdateCreation date.
publishedAtdatePublication date.
messagestringPost message.
postTypestringPost type.
socialAccountSocialAccountTarget social account.
statusintPost status.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/4283ab2d-e3dd-7b1a-7cd6-bbcc71e1xxxx?fields=id,message,postType,publishedAt,socialAccount,status' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/posts/categoriesBearer requis

6.3.Get post categories

Return category aggregations used by post filters and dashboards.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
totalintTotal number of categories found.
rows.keystringCategory value.
rows.doc_countintNumber of posts in the category.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/categories?filters=brandId:1&size=100' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/posts/brandsBearer requis

6.4.Get post brands

Return brand aggregations for posts visible to the API token role.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
totalintTotal number of brands found.
rows.keystringBrand identifier or name.
rows.doc_countintNumber of posts for the brand.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/brands?filters=publishedAt:-30%20days..now&size=100' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/posts/usersBearer requis

6.5.Get post users

Return user aggregations for post author and collaboration filters.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
totalintTotal number of users found.
rows.keystringUser identifier or name.
rows.doc_countintNumber of posts for the user.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/users?filters=brandId:1&size=100' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/posts/languagesBearer requis

6.6.Get post languages

Return language aggregations for post filters.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
totalintTotal number of languages found.
rows.keystringLanguage code.
rows.doc_countintNumber of posts for the language.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/languages?filters=brandId:1&size=50' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/posts/histogramBearer requis

6.7.Get post histogram

Return time-bucketed post counts or counter values for graphing.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
pageintZero-based page number.Défaut: 0
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
sortstringSort expression. Prefix a field with "-" for descending order.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
fieldsstringComma-separated fields to include in each returned item.
existsstringComma-separated fields that must exist in each returned item.
histogramFieldstringField used as the histogram date source.
histogramIntervalstringBucket interval such as hour, day, week, or month.
histogramTimezonestringTimezone offset used to build buckets.

Champs retournés

ChampTypeDescription
bucketsobject[]Histogram buckets.
buckets.keystringBucket key or date.
buckets.doc_countintNumber of posts in the bucket.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/histogram?filters=brandId:1;publishedAt:2026-05-01T00:00:00Z..2026-05-27T23:59:59Z&histogramField=publishedAt&histogramInterval=day' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/posts/aggregationBearer requis

6.8.Get post aggregation

Return generic aggregations for post dashboards and filter facets.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
existsstringComma-separated fields that must exist in each returned item.
fieldstringField to aggregate.

Champs retournés

ChampTypeDescription
totalintTotal number of aggregation buckets.
rows.keystringBucket key.
rows.doc_countintBucket count.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/aggregation?field=socialAccount.type&filters=brandId:1&size=20' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/posts/statsBearer requis

6.9.Get post stats

Return aggregated post performance statistics for dashboard widgets.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
pageintZero-based page number.Défaut: 0
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
sortstringSort expression. Prefix a field with "-" for descending order.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
fieldsstringComma-separated fields to include in each returned item.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
rowsobject[]Stat rows returned by the selected filters.
totalintTotal matching posts or stats rows.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/stats?filters=brandId:1;publishedAt:-30%20days..now&fields=counters.total&size=50' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
POST/posts/checkBearer requis

6.10.Check post content

Validate post content before publishing. The BO uses this endpoint to surface publication warnings.

Paramètres body

ChampTypeDescription
messagestringPost message to validate.
titlestringPost title.
descriptionstringPost description.
socialAccount.typestringTarget social network type.
brandIdintBrand ID.

Champs retournés

ChampTypeDescription
validboolWhether the post content passed validation.
warningsobject[]Warnings returned by publication checks.
errorsobject[]Blocking validation errors.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/check' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "brandId": 1,
6 "message": "Post copy",
7 "socialAccount.type": "linkedin"
8 }'
GET/posts/tagsBearer requis

6.11.Get post tags

Return matching tags for autocomplete and reporting filters.

Rate limit200 calls

Paramètres query

ChampTypeDescription
sizeintCount of results to return.Défaut: 10
prefixstringTag prefix.
selectedstringAlready selected tags, comma separated.
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
totalintTotal number of items found.
rows.keystringTag.
rows.doc_countintNumber of posts where the tag was found.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/tags?filters=publishedAt:-30%20days..now;socialAccount.type:facebook&size=100' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/posts/topicsBearer requis

6.12.Get post topics

Return matching topics for autocomplete and reporting filters.

Rate limit200 calls

Paramètres query

ChampTypeDescription
sizeintCount of results to return.Défaut: 10
prefixstringTopic prefix.
selectedstringAlready selected topics, comma separated.
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
totalintTotal number of items found.
rows.keystringTopic.
rows.doc_countintNumber of posts where the topic was found.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/topics?filters=publishedAt:-30%20days..now;socialAccount.type:facebook&size=100' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
POST/posts/bulkBearer requis

6.13.Create posts in bulk

Create a collection of posts. Use postType "flying" with a shortlink mappingId to publish a flying link.

Rate limit200 calls

Paramètres body

ChampTypeDescription
post*Post[]Array of post objects.
->brandId*intBrand ID used to create the post.
->postType*stringNonli post type: text, video, link, photo, album, flying, reel, document, etc.
->shortlink.mappingIdstringRelated shortlink ID.
->messagestringPost message.
->titlestringDisplayed post title.
->descriptionstringLink or media description.
->schedule.startDatedateScheduled publication start date. If schedule is omitted, the post is published now.
->image[].fontanSlugstringFontan image slug.
->image[].urlstringExternal image URL.
->video[].mappingIdstringUploaded video ID.

Champs retournés

ChampTypeDescription
Post[]Post[]Created posts with status and additional values.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/posts/bulk' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "post": [
6 {
7 "brandId": 1,
8 "shortlink": {
9 "mappingId": "c9d00b2d-06bf-7aa6-aa33-50690e55xxxx"
10 },
11 "postType": "flying"
12 }
13 ]
14 }'
PUT/posts/bulkBearer requis

6.14.Update posts in bulk

Update a collection of posts. Send post.id and, when available, createdAt to optimize lookup.

Rate limit200 calls

Paramètres body

ChampTypeDescription
checkBeforeUpdateboolCheck posts before updating them and skip update if checks fail.
updatePostOnNetworkboolUpdate posts on the social network. Set false to update Nonli only.Défaut: true
post*Post[]Array of post objects to update.
->id*stringPost ID.
->createdAtdateCreation date, used to optimize the update request.
->shortIdstringNew short ID.
->scheduleobjectScheduling information. Empty object publishes now.
->messagestringUpdated post message.

Champs retournés

ChampTypeDescription
Post[]Post[]Updated posts with status and additional values.

Exemple

bash
1curl --location --request PUT 'https://api.nonli.com/v2.1/posts/bulk' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "post": [
6 {
7 "id": "4283ab2d-e3dd-7b1a-7cd6-bbcc71e1xxxx",
8 "shortId": "new-short-id",
9 "schedule": {}
10 }
11 ]
12 }'
DELETE/posts/bulkBearer requis

6.15.Delete posts in bulk

Delete a collection of posts. The async flag can be used for background deletion.

Rate limit100 calls

Paramètres body

ChampTypeDescription
post*Post[]Array of posts to delete.
->id*stringPost ID to delete.
->socialAccountExternalIdstringExternal social account ID.
->createdAtdateCreation date of the post to delete.
asyncboolDelete posts asynchronously.Défaut: false

Champs retournés

ChampTypeDescription
Post[]Post[]Deleted posts or per-item errors.

Exemple

bash
1curl --location --request DELETE 'https://api.nonli.com/v2.1/posts/bulk' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "post": [
6 {
7 "id": "4283ab2d-e3dd-7b1a-7cd6-bbcc71e1xxxx",
8 "createdAt": "2024-11-26T10:07:36Z"
9 }
10 ]
11 }'

8.Listening

6 endpoints

Search social-network performance and organic website content signals.

GET/listening/organic/:organicIdBearer requis

8.3.Get organic content

Return one indexed organic content item by ID.

Paramètres query

ChampTypeDescription
fieldsstringComma-separated fields to include.

Champs retournés

ChampTypeDescription
idstringOrganic content ID.
canonicalUrlstringCanonical URL.
titlestringTitle.
descriptionstringDescription.
publishedAtdatePublication date.
counters.totalCounterTotal[]Aggregated counters.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/listening/organic/8f14e45fceea167a5a36dedd4bea2543?fields=id,title,canonicalUrl,counters.total' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/listening/organic/statsBearer requis

8.4.Get organic stats

Return aggregated Organic Listening performance statistics.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
pageintZero-based page number.Défaut: 0
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
sortstringSort expression. Prefix a field with "-" for descending order.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
fieldsstringComma-separated fields to include in each returned item.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
rowsobject[]Stat rows returned by the selected filters.
totalintTotal matching content or stats rows.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/listening/organic/stats?filters=type:article;publishedAt:-30%20days..now&fields=counters.total' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/listening/organic/aggregationBearer requis

8.5.Get organic aggregation

Return generic aggregations for Organic Listening dashboards and filters.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
existsstringComma-separated fields that must exist in each returned item.
fieldstringField to aggregate.

Champs retournés

ChampTypeDescription
totalintTotal number of buckets.
rows.keystringBucket key.
rows.doc_countintBucket count.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/listening/organic/aggregation?field=type&filters=publishedAt:-30%20days..now&size=20' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/listening/organic/suggest/:fieldBearer requis

8.6.Suggest organic filter values

Return autocomplete suggestions for an Organic Listening field.

Paramètres query

ChampTypeDescription
qstringSuggestion query.
sizeintCount of suggestions to return.Défaut: 10
filtersstringOptional filters to constrain suggestions.

Champs retournés

ChampTypeDescription
rowsobject[]Suggested field values.
rows.keystringSuggested value.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/listening/organic/suggest/title?q=election&size=10' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'

9.Themes

6 endpoints

Read saved theme filters used by listening, publishing, and automation workflows.

GET/themes/:themeIdBearer requis

9.2.Get a theme

Return one saved theme by ID.

Paramètres query

ChampTypeDescription
fieldsstringComma-separated fields to include.
embedstringUse embed=roles to include associated roles.

Champs retournés

ChampTypeDescription
idintUnique theme ID.
namestringName.
valuestringTheme filters object.
queryStringsobjectPrebuilt query strings for matching sections.
scopestringVisibility scope.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/themes/123?fields=id,name,value,queryStrings,scope&embed=roles' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
POST/themesBearer requis

9.3.Create a theme

Create a saved theme from listening or post filters.

Paramètres body

ChampTypeDescription
name*stringTheme name.
type*stringTheme type, for example listening or post.
scopestringVisibility scope for API tokens: team, bot, or public.
langstringLanguage code.
value*objectTheme filters and section configuration.

Champs retournés

ChampTypeDescription
idintCreated theme ID.
namestringTheme name.
queryStringsobjectPrebuilt query strings.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/themes' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "name": "Editorial performance",
6 "type": "listening",
7 "scope": "team",
8 "lang": "fr",
9 "value": {
10 "filters": {
11 "brandId": [1]
12 }
13 }
14 }'
PUT/themes/:themeIdBearer requis

9.4.Update a theme

Update a saved theme and rebuild its query strings when the value changes.

Paramètres body

ChampTypeDescription
namestringTheme name.
scopestringVisibility scope.
valueobjectTheme filters and section configuration.

Champs retournés

ChampTypeDescription
idintUpdated theme ID.
namestringTheme name.
queryStringsobjectPrebuilt query strings.

Exemple

bash
1curl --location --request PUT 'https://api.nonli.com/v2.1/themes/123' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "name": "Updated theme"
6 }'
DELETE/themes/:themeIdBearer requis

9.5.Delete a theme

Delete a saved theme.

Champs retournés

ChampTypeDescription
deletedboolWhether the theme was deleted.

Exemple

bash
1curl --location --request DELETE 'https://api.nonli.com/v2.1/themes/123' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/themes/rolesBearer requis

9.6.Get theme roles

Return roles that can be associated with team-scoped themes.

Champs retournés

ChampTypeDescription
totalintTotal number of roles found.
rowsAclRoles[]Available roles.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/themes/roles' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'

10.Bots

6 endpoints

Manage automation bots that transform sources such as feeds, themes, or social accounts into publishable posts.

GET/bots/:botIdBearer requis

10.2.Get a bot

Return one bot by UUID.

Paramètres query

ChampTypeDescription
fieldsstringComma-separated fields to include.
embedstringCan embed running and spamControl.

Champs retournés

ChampTypeDescription
idstringBot UUID.
titlestringBot title.
brandIdintBrand attached to the bot.
activationobjectActivation and scheduling state.
sourceobjectSource configuration.
targetobject[]Target configurations.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/bots/5c9b6e52-8d4e-4f16-9f16-c01e9cbbd9e1?fields=id,title,brandId,activation,source,target&embed=running' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
POST/bots/bulkBearer requis

10.3.Create bots in bulk

Create one or more bots. Source and target URNs must reference resources visible to the API token role.

Paramètres body

ChampTypeDescription
bot*Bot[]Bots to create.
->title*stringBot title.
->brandId*intBrand attached to the bot.
->autoboolIf false, created posts are kept for review before publishing.
->activationobjectActivation state and optional time window.
->timezonestringTimezone used for activation windows.
->runCyclePeriodobjectMinimum and maximum minutes between source reads.
->scheduleobjectPost scheduling options.
->source*objectSource object with a Nonli URN.
->target*object[]Target objects with Nonli URNs.
->postobject[]Post template configuration.
->fieldMappingobject[]Source-to-target field mappings.
->sourceMessagestringSource field used to build the post message.
->sourceTitlestringSource field used to build the post title.
->sourceImagestringSource field used to build the post image.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/bots/bulk' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "bot": [
6 {
7 "title": "Morning feed review",
8 "brandId": 1,
9 "auto": false,
10 "activation": {
11 "alive": false
12 },
13 "timezone": "Europe/Paris",
14 "runCyclePeriod": {
15 "min": 30,
16 "max": 60
17 },
18 "source": {
19 "urn": "urn:nonli:feed:https://example.com/rss.xml",
20 "name": "Editorial feed"
21 },
22 "target": [
23 {
24 "urn": "urn:nonli:sa:facebook:PAGE_ID",
25 "name": "Facebook page"
26 }
27 ],
28 "post": [
29 {
30 "index": 0,
31 "prefix": "",
32 "suffix": ""
33 }
34 ],
35 "fieldMapping": [
36 {
37 "source": "title",
38 "target": "message"
39 }
40 ],
41 "sourceMessage": "title",
42 "sourceTitle": "title",
43 "sourceImage": "og_image"
44 }
45 ]
46 }'

Exemple de réponse

json
1[
2 {
3 "id": "5c9b6e52-8d4e-4f16-9f16-c01e9cbbd9e1",
4 "title": "Morning feed review",
5 "brandId": 1,
6 "activation": {
7 "alive": false
8 }
9 },
10 {
11 "error": "Bot creation failed"
12 }
13]
PUT/bots/bulkBearer requis

10.4.Update bots in bulk

Update one or more bots. Each item must include the bot UUID and only the fields to change.

Paramètres body

ChampTypeDescription
bot*Bot[]Bots to update.
->id*stringBot UUID.
->titlestringBot title.
->brandIdintBrand attached to the bot.
->autoboolWhether the bot publishes automatically.
->activationobjectActivation state and optional time window.
->runCyclePeriodobjectMinimum and maximum minutes between source reads.
->scheduleobjectPost scheduling options.
->sourceobjectSource object with a Nonli URN.
->targetobject[]Target objects with Nonli URNs.
->postobject[]Post template configuration.
->fieldMappingobject[]Source-to-target field mappings.

Exemple

bash
1curl --location --request PUT 'https://api.nonli.com/v2.1/bots/bulk' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "bot": [
6 {
7 "id": "5c9b6e52-8d4e-4f16-9f16-c01e9cbbd9e1",
8 "title": "Morning feed review",
9 "activation": {
10 "alive": true
11 },
12 "runCyclePeriod": {
13 "min": 45,
14 "max": 90
15 }
16 }
17 ]
18 }'

Exemple de réponse

json
1[
2 {
3 "id": "5c9b6e52-8d4e-4f16-9f16-c01e9cbbd9e1",
4 "title": "Morning feed review",
5 "brandId": 1,
6 "activation": {
7 "alive": true
8 }
9 },
10 {
11 "error": "Bot update failed"
12 }
13]
DELETE/bots/:botIdBearer requis

10.5.Delete a bot

Delete one bot by UUID. A successful deletion returns HTTP 204 with no response body.

Exemple

bash
1curl --location --request DELETE 'https://api.nonli.com/v2.1/bots/5c9b6e52-8d4e-4f16-9f16-c01e9cbbd9e1' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'
GET/bots/infoBearer requis

10.6.Get bot configuration info

Return schedule periods, target validation rules, and bot configuration constraints used to build valid bot payloads.

Paramètres query

ChampTypeDescription
sourceUrnstringOptional source URN to evaluate source-specific configuration.
targetUrnstringOptional target URN to evaluate target-specific configuration.

Champs retournés

ChampTypeDescription
schedulePeriodsobjectAvailable schedule period identifiers and labels.
targetValidationConfigsobjectValidation rules by target type.
configobjectBot defaults and constraints, including AI generated text and consultation frequency.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/bots/info?sourceUrn=urn%3Anonli%3Afeed%3Ahttps%3A%2F%2Fexample.com%2Frss.xml&targetUrn=urn%3Anonli%3Asa%3Afacebook%3APAGE_ID' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'

11.Media

2 endpoints

Search reusable media and metadata used by the publishing composer.

GET/media/tagsBearer requis

11.2.Get media tags

Return media tags for autocomplete and asset filtering.

Paramètres query

ChampTypeDescription
sizeintMaximum number of results to return.Défaut: 20 or endpoint-specific
qstringFull-text search query.
qfstringComma-separated fields used by the full-text query.
filtersstringAND filters on item fields. Use semicolons between filters and ".." for ranges.
filtersOrstringOR filters on item fields. Example: "status:200,203".
excludesstringExclude results when a field contains a value.
existsstringComma-separated fields that must exist in each returned item.

Champs retournés

ChampTypeDescription
totalintTotal number of tags found.
rows.keystringTag value.
rows.doc_countintNumber of media items using the tag.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/media/tags?size=100' \
2 --header 'Authorization: Bearer YOUR_API_TOKEN'

12.Uploads

6 endpoints

Upload images, videos, and documents before attaching them to posts.

POST/upload/imageBearer requis

12.1.Upload an image

Upload a base64 image and receive the Fontan slug used by posts and shortlinks.

Paramètres body

ChampTypeDescription
b64Image*stringBase64 encoded image.
keepFormatboolKeep the original format when possible.
faceDetectboolRun face detection/cropping assistance.Défaut: true

Champs retournés

ChampTypeDescription
slugstringFontan image slug.
urlstringImage URL when available.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/upload/image' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "b64Image": "data:image/png;base64,iVBORw0KGgo...",
6 "keepFormat": true
7 }'
POST/upload/video/tokenBearer requis

12.2.Create upload video token

Create or resume an upload session. The response includes chunkSize, which defines the maximum chunk size to send.

Paramètres body

ChampTypeDescription
name*stringFile name.
type*stringVideo MIME type.
size*intFile size in bytes.
md5sum*stringUnique video ID, md5 encoded.
durationintVideo duration in seconds.
widthintVideo width in pixels.
heightintVideo height in pixels.
titlestringVideo title.
descriptionstringVideo description.
customTagstring[]Video custom tags.

Champs retournés

ChampTypeDescription
tokenstringUpload token.
sizeintFile size in bytes.
chunkSizeintChunk size in bytes.
chunkIndexintNext chunk index.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/upload/video/token' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "md5sum": "64bed820ce612754d1e3e957edfc69c7",
6 "name": "35427-407130886_small.mp4",
7 "size": 1338788,
8 "type": "video/mp4",
9 "title": "My video title",
10 "description": "My video description",
11 "customTag": ["foo", "bar"]
12 }'
POST/upload/video/existsBearer requis

12.3.Check uploaded video existence

Check if a video already exists before starting a chunked upload.

Paramètres body

ChampTypeDescription
md5sum*stringUnique video ID, md5 encoded.
name*stringFile name.

Champs retournés

ChampTypeDescription
existsboolWhether the video already exists.
idstringExisting video ID when found.
urlstringExisting video URL when found.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/upload/video/exists' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "md5sum": "64bed820ce612754d1e3e957edfc69c7",
6 "name": "35427-407130886_small.mp4"
7 }'
POST/upload/video/chunkBearer requis

12.4.Upload video chunk

Upload one base64 chunk for a video upload session. The final response includes the video id and URL.

Paramètres body

ChampTypeDescription
token*stringUpload token.
chunk*intChunk number.
data*stringChunk bytes as base64.

Champs retournés

ChampTypeDescription
sizeintUploaded size after this chunk.
idstringVideo ID, returned when the last chunk has been uploaded.
urlstringVideo URL, returned when the last chunk has been uploaded.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/upload/video/chunk' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "token": "e5bab8115967331ce0db284e03622cf0",
6 "chunk": 1,
7 "data": "AAAAIGZ0eXBtcDQyAAAAAG1wNDJtcDQxaXNvbWF2YzEAABF9b..."
8 }'
POST/upload/document/tokenBearer requis

12.5.Create upload document token

Create or resume a document upload session. The response includes chunkSize for chunked upload.

Paramètres body

ChampTypeDescription
name*stringFile name.
type*stringDocument MIME type, commonly application/pdf.
size*intFile size in bytes.
md5sum*stringUnique document ID, md5 encoded.
titlestringDocument title.
descriptionstringDocument description.
pageCountintNumber of pages in the document.

Champs retournés

ChampTypeDescription
tokenstringUpload token.
sizeintFile size in bytes.
chunkSizeintChunk size in bytes.
chunkIndexintNext chunk index.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/upload/document/token' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "md5sum": "64bed820ce612754d1e3e957edfc69c7",
6 "name": "press-release.pdf",
7 "size": 1024000,
8 "type": "application/pdf",
9 "title": "Press release",
10 "pageCount": 3
11 }'
POST/upload/document/chunkBearer requis

12.6.Upload document chunk

Upload one base64 chunk for a document upload session. The final response includes the document id and URL.

Paramètres body

ChampTypeDescription
token*stringUpload token.
chunk*intChunk number.
data*stringChunk bytes as base64.

Champs retournés

ChampTypeDescription
sizeintUploaded size after this chunk.
idstringDocument ID, returned when the last chunk has been uploaded.
urlstringDocument URL, returned when the last chunk has been uploaded.

Exemple

bash
1curl --location 'https://api.nonli.com/v2.1/upload/document/chunk' \
2 --header 'Content-Type: application/json' \
3 --header 'Authorization: Bearer YOUR_API_TOKEN' \
4 --data '{
5 "token": "e5bab8115967331ce0db284e03622cf0",
6 "chunk": 1,
7 "data": "JVBERi0xLjQKJc..."
8 }'