Skip to main content
All CollectionsIntegrationsEmbed & API
Getting started with the API
Getting started with the API

How to use the API & API documentation

Michael Simmons avatar
Written by Michael Simmons
Updated over 10 months ago

LaunchNotes was made with collaboration and communication across teams at the heart of what we do. Collaboration across tools and teams works best when everyone stays in sync and processes work seamlessly.

This article will discuss the following:


GraphQL

We use GraphQL for our API, which provides powerful functionality and flexibility.

๐Ÿ’ก Tip: If you're unfamiliar with GraphQL, you can find out more about it here: https://graphql.org/


API documentation

Our API documentation can be found at https://developer.launchnotes.com/index.html. You can search the different Operations (queries and mutations) and Types in the left hand navigation bar, which will bring up the relevant fields, nodes, and implementations:


API Authentication

Creating an API token

To interact with our API, you'll need to generate an API token. This can be found under Settings > API & Embed in the LaunchNotes admin navbar, and selecting the create API Token button.

There are two types of API tokens: publishable and management:

Read-only Public tokens

Public API (read-only)

This API user can only read in public Announcements. Perfect for embedding published Announcements into your web app using our pop-over embed or the API itself.

Management API tokens

Management API tokens provide read and write access to your project. Their level of permission is that of a Contributor, so they can create and update Announcements. These tokens should never be shared publicly and are suitable for server-side use cases where you might want to automate the creation of content.

The GraphQL endpoint

https://app.launchnotes.io/graphql

The endpoint is the same for all operations, regardless of token type.

Using an API token

You must provide an API token as a Bearer token for every request to the API.

For example:

curl 'H "Authorization: Bearer public_QKHLUeWw6HxyE5cq9nujHqqX" \ 
-X POST -d " \
{ \
\"query\": \"query { viewer { id }}\" \
} \
" https://app.launchnotes.io/graphql


Interacting with the API

Entrypoint

All operations should be made through the viewer field.

For example, querying a project's categories:

query GetCategories {  
viewer {
project(id: "your_project_id") {
categories {
nodes {
id
name
description
color
}
}
}
}
}

Creating an Announcement:

query:

mutation useCreateAnnouncement_Mutation ($projectId: ID!) {
createAnnouncement(input: { announcement: { projectId: $projectId } }) {
announcement {
id
}
errors {
message
path
}
}
}

Updating an Announcement

query:

mutation useUpdateAnnouncement_Mutation ($announcement: UpdateAnnouncementAttributes!) {
updateAnnouncement(input: { announcement: $announcement }) {
announcement {
id
headline
}
errors {
message
path
}
}
}


Access limitations

Rate limit

An API token can run a maximum of 300 operations every 5 minutes.

Frequently used snippets

Here are some frequently used snippet examples that are helpful when looking to integrate LaunchNotes with your Consent Hub:


We're here to help!

โœ‰๏ธ If you have any questions or suggestions for our API and API documentation,

please get in touch with us at [email protected].

Did this answer your question?