Method: fhir.create

Full name: projects.locations.datasets.fhirStores.fhir.create

Creates a FHIR resource.

Implements the FHIR standard create interaction (DSTU2, STU3, R4), which creates a new resource with a server-assigned resource ID.

Also supports the FHIR standard conditional create interaction (DSTU2, STU3, R4), specified by supplying an If-None-Exist header containing a FHIR search query, limited to searching by resource identifier. If no resources match this search query, the server processes the create operation as normal.

When using conditional create, the search term for identifier should be in the pattern identifier=system|value or identifier=value - similar to the search method on resources with a specific identifier.

The request body must contain a JSON-encoded FHIR resource, and the request headers must contain Content-Type: application/fhir+json.

On success, the response body contains a JSON-encoded representation of the resource as it was created on the server, including the server-assigned resource ID and version ID. Errors generated by the FHIR store contain a JSON-encoded OperationOutcome resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead.

For samples that show how to call create, see Creating a FHIR resource.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



Required. The name of the FHIR store this resource belongs to.

Authorization requires the following IAM permission on the specified resource parent:

  • healthcare.fhirResources.create


Required. The FHIR resource type to create, such as Patient or Observation. For a complete list, see the FHIR Resource Index (DSTU2, STU3, R4). Must match the resource type in the provided content.

Request body

The request body contains an instance of HttpBody.

Response body

If successful, the response is a generic HTTP response whose format is defined by the method.

Authorization scopes

Requires one of the following OAuth scopes:


For more information, see the Authentication Overview.