JSON preserve that complete payload.
POST with a JSON body containing a query, exactly as with any GraphQL endpoint. GET and DELETE return 405 Method Not Allowed — queries over GET are optional in the GraphQL specification and are not supported here.
Your first query
data field:
Asking for several things at once
The reason to reach for GraphQL is a request like this, which would be four REST calls:Authentication
Identical to REST. Send your API key as a bearer token:profileKey can select a profile in either of two ways:
- Send
Profile-Keyas the request-wide default. - Pass
profileKeyon an individual field to override that default, allowing one request to act on more than one profile.
profileKey and may reject a Profile-Key header; for example, createProfile must use the primary API key without that header. Check each field’s schema definition for its scope, and see Managing multiple users for how profile keys work.
Try it without writing code
The GraphQL Explorer is an interactive browser for the current schema. It lists every available GraphQL operation with its arguments and descriptions, autocompletes as you type, and runs queries against your account. You do not need an API key to browse the schema — the schema is public, the same way this documentation is. You do need one to run a query, because every operation goes through the same authentication as REST.Should you use GraphQL or REST?
REST remains the primary interface and the one most of our documentation, SDKs, and integrations are built around. Reach for GraphQL when:- You need several unrelated pieces of data and want them in one round trip.
- You want machine-readable operation names, arguments, input objects, enums, and typed response selections. Most responses remain
JSONso they preserve the complete REST envelope;createPostcurrently returns a typedPostResult. - You are exploring the API and want to see what exists without moving between documentation pages.
- You are uploading files. Media bytes cannot travel through a GraphQL request — see Uploading media for the supported path.
- You are using one of our SDKs or no-code integrations, which speak REST.
- You want the smallest possible dependency footprint. A REST call needs nothing but an HTTP client.
Read next
- Using the API — finding operations, argument types, and uploading media.
- Errors — which failures change the HTTP status, why failed operations still return HTTP 200, and how to handle partial success.
- Limits and Billing — query size caps and how requests are counted.