---
title: Convert JSON to GraphQL Schema API
slug: convert-json-to-graphql-sdl
url: https://apyhub.com/apyhub/service/convert-json-to-graphql-sdl
provider: ApyHub
categories: [Developer Tools, File Conversion, Smart Generation]
auth: api_key
---

# Convert JSON to GraphQL Schema API

Convert raw JSON, uploaded files, or JSON URLs into GraphQL SDL. Get inline text, a .graphql download, or a pre-signed S3 URL.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/convert/json-file/graphql-url` | What it does Converts an uploaded JSON file into GraphQL SDL and returns a pre-signed S3 URL for th… | 50 |
| POST | `/convert/json-raw/graphql-raw` | What it does Converts a raw JSON object in the request body into GraphQL SDL and returns the SDL as… | 50 |
| POST | `/convert/json-raw/graphql-url` | What it does Converts a raw JSON object sent in the request body into GraphQL SDL, then returns a p… | 50 |
| POST | `/convert/json-url/graphql-file` | What it does Converts the JSON document available at a public URL into a GraphQL SDL file for downl… | 50 |
| POST | `/convert/json-raw/graphql-file` | What it does Converts a raw JSON object in the request body into a downloadable GraphQL SDL file. T… | 50 |
| POST | `/convert/json-url/graphql-raw` | What it does Converts the JSON document available at a public URL into GraphQL SDL and returns the… | 50 |
| POST | `/convert/json-url/graphql-url` | What it does Converts the JSON file available at the provided URL into GraphQL SDL, then returns a… | 50 |
| POST | `/convert/json-file/graphql-raw` | What it does Uploads a JSON file and returns GraphQL SDL as the response. The input must be a JSON… | 50 |
| POST | `/convert/json-file/graphql-file` | What it does Converts an uploaded JSON file into a downloadable GraphQL SDL file. The request uploa… | 50 |

## About

## What it does
Convert JSON into GraphQL SDL with the JSON to GraphQL SDL service. Send a non-empty JSON object, or point it at a public JSON URL or uploaded JSON file, and get GraphQL schema definition language back as inline text, a downloadable `.graphql` file, or a pre-signed S3 URL.

Use the raw-body endpoints when you already have JSON in your request payload. Use the file-upload endpoints when your JSON lives in a file, and the URL endpoints when the source is hosted elsewhere. The file-based routes require a JSON file with MIME type `application/json`, while the URL-based routes accept a public URL that serves JSON-compatible content or a `.json` path.

The response format depends on the route you choose: inline endpoints return the generated SDL as a string, downloadable-file endpoints return binary GraphQL SDL, and S3-url endpoints return an object with a `data` field containing a pre-signed URI.

This is useful when you need to turn API payloads, sample responses, or data exports into a GraphQL schema draft for documentation, prototyping, or schema-first development.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/convert-json-to-graphql-sdl
