Cap Collectif Developers - GraphQL API

Thank you for your interest in our public API !

This is an early release… We will progressively enhance the documentation (including more examples !) and complete what can be retrieved via the public API, throughout the following weeks. Thank you in advance for your patience and do not hesitate to return regularly to this documentation to see its evolution.

Please notice, you do not need an API key to read public data.

The technical team of Cap Collectif.

Overview

Cap Collectif provides an API to read and write data.

Endpoint

This is an HTTPS-only and POST-only API. All API requests are made to https://granddebat.fr/graphql.

Authentication

Authentication is based on API Keys. Each API Key is associated with a user. Results returned from various responses are based upon the role of the user to which the API key is tied.

  • ROLE_USER indicates that this field can only be access if authenticated.
  • ROLE_ADMIN indicates that this field can only be access if authenticated as an administrator.

Your API Keys

Right now, you can't generate an API Key. Contact [email protected] if needed.

How to use an API Key

To make an authenticated query, add an Authorization header with content "Bearer token". Example using cURL :

curl -H "Content-Type: application/json" -H "Authorization: Bearer token" -X POST -d '{"query":"query viewer {\n viewer {\n id\n username\n }\n}"}' https://granddebat.fr/graphql

Rate limits

We currently have no rate limits, but this might be coming soon.

About the GraphQL schema reference

The docs in the sidebar are generated from our GraphQL schema. All calls are validated and executed against the schema. Use these docs to find out what data you can call:
  • Allowed operations: queries and mutations.
  • Schema-defined types: scalars, objects, enums, interfaces, unions, and input objects.