API Endpoints

    DatoCMS offers a single GraphQL endpoint:

    https://graphql.datocms.com/

    The endpoint remains constant no matter what operation you perform, and it's read only — that is, it does not offer any mutation operation. You can use our Content Management API for that.

    Preview endpoint

    If you have the Draft/Published system active on some of your models, you can use a different endpoint to access records at their latest version available, instead of the currently published: this can be useful on staging environments, or your local development machine:

    https://graphql.datocms.com/preview

    Both endpoints offer exactly the same queries, the only thing that will change will be the returned content.

    Specifying an environment

    Sandbox environments are currently in closed beta: if you're interested in joining the program, reach out to us using our Support form

    The aforementioned endpoints always point to the primary environment.

    To explicitely read data from a specific environment you can use the following endpoints:

    https://graphql.datocms.com/environments/{ENVIRONMENT-NAME}
    https://graphql.datocms.com/environments/{ENVIRONMENT-NAME}/preview