---
title: "Replaces the content of a named graph or the default graph."
method: PUT
path: "/{storeName}/graphs"
tags: ["graph store protocol"]
---

# Replaces the content of a named graph or the default graph.

`PUT /{storeName}/graphs`

This endpoint implements the [SPARQL 1.1 Graph Store HTTP Protocol](http://www.w3.org/TR/sparql11-http-rdf-update/).

**NOTE** One of either the `default` or the `graph` parameters must be provided.

## Path parameters

- `storeName` string, required

## Query parameters

- `default` boolean
- `graph` string, url

## Request body

- string

## Response `200`

Successful response

## Other responses

- `400` — Bad Request. Either the target graph was not specified using either the `default` or the `graph` query parameter; or the content posted was not valid RDF data.
- `406` — The content provided in the body was not in a format that could be parsed.

## Changes

- **2015-07-01** `a249d6b2182f` — 1 info
  - api operation id `postGraph` removed and replaced with `putGraph`
- **2015-05-26** `694b44600c48` — 2 info
  - api operation id `postGraph` was added
  - api tag `graph store protocol` added
- **2015-05-26** `37652d797bdc` — 1 info
  - endpoint added
- **2015-05-19** `404ee72d2da6` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/brightstardb/apis/brightstardb-rest-api/changes/:storeName/graphs/put.md)

---

[API](https://skmtc.dev/brightstardb/apis/brightstardb-rest-api.md) · [All operations](https://skmtc.dev/brightstardb/apis/brightstardb-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/brightstardb/brightstardb-rest-api/revisions/e94ef9356aa7/schema)
