> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# API definition security validation

POST https://api.getpostman.com/security/api-validation
Content-Type: application/json

Performs an analysis on the given definition and returns any issues based on your [predefined rulesets](https://learning.postman.com/docs/api-governance/configurable-rules/configurable-rules-overview/). This endpoint can help you understand the violations' impact and offers solutions to help you resolve any errors. You can include this endpoint to your CI/CD process to automate schema validation.

**Note:**

- The maximum allowed size of the definition is 10 MB.
- You must [import and enable](https://learning.postman.com/docs/api-governance/configurable-rules/configuring-api-governance-rules/) Postman's [OWASP security rules](https://postman.postman.co/api-governance/libraries/postman_owasp/view) for this endpoint to return any security rule violations.


Reference: https://learning.postman.com/api-docs/api-reference/api-security/schema-security-validation

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /security/api-validation:
    post:
      operationId: schemaSecurityValidation
      summary: API definition security validation
      description: >
        Performs an analysis on the given definition and returns any issues
        based on your [predefined
        rulesets](https://learning.postman.com/docs/api-governance/configurable-rules/configurable-rules-overview/).
        This endpoint can help you understand the violations' impact and offers
        solutions to help you resolve any errors. You can include this endpoint
        to your CI/CD process to automate schema validation.


        **Note:**


        - The maximum allowed size of the definition is 10 MB.

        - You must [import and
        enable](https://learning.postman.com/docs/api-governance/configurable-rules/configuring-api-governance-rules/)
        Postman's [OWASP security
        rules](https://postman.postman.co/api-governance/libraries/postman_owasp/view)
        for this endpoint to return any security rule violations.
      tags:
        - apiSecurity
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schemaSecurityValidationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorNameObjectNameMessage'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SchemaSecurityValidationRequestUnauthorizedError
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SchemaSecurityValidationRequestForbiddenError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SchemaSecurityValidationRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schemaSecurityValidationRequest'
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    SchemaSecurityValidationRequestSchemaLanguage:
      type: string
      enum:
        - json
        - yaml
      description: The definition format.
      title: SchemaSecurityValidationRequestSchemaLanguage
    SchemaSecurityValidationRequestSchemaType:
      type: string
      enum:
        - openapi3
        - openapi2
      description: The definition type.
      title: SchemaSecurityValidationRequestSchemaType
    SchemaSecurityValidationRequestSchema:
      type: object
      properties:
        language:
          $ref: '#/components/schemas/SchemaSecurityValidationRequestSchemaLanguage'
          description: The definition format.
        schema:
          type: string
          description: The stringified API definition.
        type:
          $ref: '#/components/schemas/SchemaSecurityValidationRequestSchemaType'
          description: The definition type.
      required:
        - language
        - schema
        - type
      title: SchemaSecurityValidationRequestSchema
    schemaSecurityValidationRequest:
      type: object
      properties:
        schema:
          $ref: '#/components/schemas/SchemaSecurityValidationRequestSchema'
      title: schemaSecurityValidationRequest
    schemaSecurityValidationResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: object
            additionalProperties:
              description: Any type
          description: >
            Information about each issue discovered in the analysis. Each object
            includes the violation's severity and category, the location of the
            issue, data paths, and other information. This returns an empty
            object if there are no issues present in the schema.


            If there are issues, this returns the `possibleFixUrl` response in
            each warning object. This provides a link to documentation you can
            use to resolve the warning.
      title: schemaSecurityValidationResponse
    CommonErrorNameObjectNameMessageErrorName:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      title: CommonErrorNameObjectNameMessageErrorName
    CommonErrorNameObjectNameMessageError:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/CommonErrorNameObjectNameMessageErrorName'
      description: Information about the error.
      title: CommonErrorNameObjectNameMessageError
    commonErrorNameObjectNameMessage:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CommonErrorNameObjectNameMessageError'
          description: Information about the error.
      title: commonErrorNameObjectNameMessage
    CommonErrorTypeTitleDetailStatusType:
      oneOf:
        - type: string
          format: uri-reference
        - type: string
      title: CommonErrorTypeTitleDetailStatusType
    commonErrorTypeTitleDetailStatus:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailStatusType'
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: Information about the error.
        status:
          type: integer
          description: The error's HTTP status code.
      title: commonErrorTypeTitleDetailStatus
    CommonErrorNameMessageError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      description: Information about the error.
      title: CommonErrorNameMessageError
    commonErrorNameMessage:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CommonErrorNameMessageError'
          description: Information about the error.
      title: commonErrorNameMessage
    SchemaSecurityValidationRequestUnauthorizedError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: SchemaSecurityValidationRequestUnauthorizedError
    SchemaSecurityValidationRequestForbiddenError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: SchemaSecurityValidationRequestForbiddenError
    CommonErrorTypeTitleDetailDetail:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: Information about the error.
      title: CommonErrorTypeTitleDetailDetail
    commonErrorTypeTitleDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of error.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailDetail'
          description: Information about the error.
      title: commonErrorTypeTitleDetail
    SchemaSecurityValidationRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: SchemaSecurityValidationRequestInternalServerError
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## Examples

### No Warnings Found



**Request**

```json
undefined
```

**Response**

```json
{
  "warnings": []
}
```

**SDK Code**

```python No Warnings Found
import requests

url = "https://api.getpostman.com/security/api-validation"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript No Warnings Found
const url = 'https://api.getpostman.com/security/api-validation';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go No Warnings Found
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/security/api-validation"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby No Warnings Found
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/security/api-validation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java No Warnings Found
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/security/api-validation")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php No Warnings Found
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/security/api-validation', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp No Warnings Found
using RestSharp;

var client = new RestClient("https://api.getpostman.com/security/api-validation");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift No Warnings Found
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/security/api-validation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Successful Response with Governance Warnings



**Request**

```json
undefined
```

**Response**

```json
{
  "warnings": [
    {
      "category": {
        "name": "governance",
        "slug": "governance"
      },
      "checksum": "5c17d7472a8b6a22e99524fb80a4a24128bebfb9970aefa16eb496792dbc7195",
      "dataPath": [
        "paths",
        "/spacecrafts/{spacecraftId}",
        "get"
      ],
      "location": {
        "end": {
          "column": 50,
          "line": 38
        },
        "start": {
          "column": 8,
          "line": 19
        }
      },
      "message": "All of your operations need summaries.",
      "possibleFixUrl": "https://go.pstmn.io/openapi3-security-warnings#all-operations-should-have-summaries",
      "severity": "ERROR",
      "slug": "OPENAPI_SPECTRAL_6_RULE_1016",
      "type": "governance",
      "vulnerability": {
        "name": "All of your operations need summaries.",
        "slug": "OPENAPI_SPECTRAL_6_operations_summary"
      }
    }
  ]
}
```

**SDK Code**

```python Successful Response with Governance Warnings
import requests

url = "https://api.getpostman.com/security/api-validation"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Successful Response with Governance Warnings
const url = 'https://api.getpostman.com/security/api-validation';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Successful Response with Governance Warnings
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/security/api-validation"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Successful Response with Governance Warnings
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/security/api-validation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Successful Response with Governance Warnings
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/security/api-validation")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Successful Response with Governance Warnings
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/security/api-validation', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Successful Response with Governance Warnings
using RestSharp;

var client = new RestClient("https://api.getpostman.com/security/api-validation");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Successful Response with Governance Warnings
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/security/api-validation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Successful Response with Security Warnings



**Request**

```json
undefined
```

**Response**

```json
{
  "warnings": [
    {
      "category": {
        "name": "security",
        "slug": "security"
      },
      "checksum": "db2c5b351010e803bb3cebf21c48275909bd89715660fa1865e8c55595d4928d",
      "dataPath": [],
      "location": {
        "end": {
          "column": 21,
          "line": 78
        },
        "start": {
          "column": 0,
          "line": 1
        }
      },
      "message": "Security field is not defined",
      "possibleFixUrl": "https://go.pstmn.io/openapi3-security-warnings#security-field-is-not-defined",
      "severity": "ERROR",
      "slug": "OPENAPI_SCHEMA_RULE_0005",
      "type": "security",
      "vulnerability": {
        "name": "Security field is not defined",
        "slug": "OPENAPI_VUL_0003"
      }
    },
    {
      "category": {
        "name": "security",
        "slug": "security"
      },
      "checksum": "44dd11f850da75d478d246361a95435c7dd8da799ce689a8648449af7b3c7b43",
      "dataPath": [
        "paths",
        "/spacecrafts/{spacecraftId}",
        "get"
      ],
      "location": {
        "end": {
          "column": 50,
          "line": 39
        },
        "start": {
          "column": 8,
          "line": 19
        }
      },
      "message": "Operation does not enforce any security scheme.",
      "possibleFixUrl": "https://go.pstmn.io/openapi3-security-warnings#operation-does-not-enforce-any-security-scheme",
      "severity": "WARN",
      "slug": "OPENAPI_SCHEMA_RULE_0017",
      "type": "security",
      "vulnerability": {
        "name": "Operation does not enforce any security scheme",
        "slug": "OPENAPI_VUL_0012"
      }
    }
  ]
}
```

**SDK Code**

```python Successful Response with Security Warnings
import requests

url = "https://api.getpostman.com/security/api-validation"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Successful Response with Security Warnings
const url = 'https://api.getpostman.com/security/api-validation';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Successful Response with Security Warnings
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/security/api-validation"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Successful Response with Security Warnings
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/security/api-validation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Successful Response with Security Warnings
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/security/api-validation")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Successful Response with Security Warnings
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/security/api-validation', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Successful Response with Security Warnings
using RestSharp;

var client = new RestClient("https://api.getpostman.com/security/api-validation");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Successful Response with Security Warnings
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/security/api-validation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Request Body



**Request**

```json
{
  "schema": {
    "language": "json",
    "schema": "{\n  \"openapi\": \"3.0.0\",\n  \"servers\": [\n    {\n      \"url\": \"example.com\"\n    }\n  ],\n  \"info\": {\n    \"contact\": {\n      \"name\": \"Jon\"\n    },\n    \"version\": \"1.0.0\",\n    \"title\": \"Sample API\",\n    \"description\": \"Buy or rent spacecrafts\"\n  },\n  \"paths\": {\n    \"/spacecrafts/{spacecraftId}\": {\n      \"parameters\": [\n        {\n          \"name\": \"spacecraftId\",\n          \"description\": \"The unique identifier of the spacecraft\",\n          \"in\": \"path\",\n          \"required\": true,\n          \"schema\": {\n            \"$ref\": \"#/components/schemas/SpacecraftId\"\n          }\n        }\n      ],\n      \"get\": {\n        \"summary\": \"Read a spacecraft\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"The spacecraft corresponding to the provided `spacecraftId`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Spacecraft\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"No spacecraft found for the provided `spacecraftId`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          },\n          \"500\": {\n            \"description\": \"Unexpected error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"SpacecraftId\": {\n        \"description\": \"The unique identifier of a spacecraft\",\n        \"type\": \"string\"\n      },\n      \"Spacecraft\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"id\",\n          \"name\",\n          \"type\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"$ref\": \"#/components/schemas/SpacecraftId\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"type\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"capsule\",\n              \"probe\",\n              \"satellite\",\n              \"spaceplane\",\n              \"station\"\n            ]\n          },\n          \"description\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Error\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"message\"\n        ],\n        \"properties\": {\n          \"message\": {\n            \"description\": \"A human readable error message\",\n            \"type\": \"string\"\n          }\n        }\n      }\n    },\n    \"securitySchemes\": {\n      \"ApiKey\": {\n        \"type\": \"apiKey\",\n        \"in\": \"header\",\n        \"name\": \"X-Api-Key\"\n      }\n    }\n  },\n  \"security\": [\n    {\n      \"ApiKey\": []\n    }\n  ]\n}",
    "type": "openapi3"
  }
}
```

**Response**

```json
{
  "warnings": []
}
```

**SDK Code**

```python Request Body
import requests

url = "https://api.getpostman.com/security/api-validation"

payload = { "schema": {
        "language": "json",
        "schema": "{
  \"openapi\": \"3.0.0\",
  \"servers\": [
    {
      \"url\": \"example.com\"
    }
  ],
  \"info\": {
    \"contact\": {
      \"name\": \"Jon\"
    },
    \"version\": \"1.0.0\",
    \"title\": \"Sample API\",
    \"description\": \"Buy or rent spacecrafts\"
  },
  \"paths\": {
    \"/spacecrafts/{spacecraftId}\": {
      \"parameters\": [
        {
          \"name\": \"spacecraftId\",
          \"description\": \"The unique identifier of the spacecraft\",
          \"in\": \"path\",
          \"required\": true,
          \"schema\": {
            \"$ref\": \"#/components/schemas/SpacecraftId\"
          }
        }
      ],
      \"get\": {
        \"summary\": \"Read a spacecraft\",
        \"responses\": {
          \"200\": {
            \"description\": \"The spacecraft corresponding to the provided `spacecraftId`\",
            \"content\": {
              \"application/json\": {
                \"schema\": {
                  \"$ref\": \"#/components/schemas/Spacecraft\"
                }
              }
            }
          },
          \"404\": {
            \"description\": \"No spacecraft found for the provided `spacecraftId`\",
            \"content\": {
              \"application/json\": {
                \"schema\": {
                  \"$ref\": \"#/components/schemas/Error\"
                }
              }
            }
          },
          \"500\": {
            \"description\": \"Unexpected error\",
            \"content\": {
              \"application/json\": {
                \"schema\": {
                  \"$ref\": \"#/components/schemas/Error\"
                }
              }
            }
          }
        }
      }
    }
  },
  \"components\": {
    \"schemas\": {
      \"SpacecraftId\": {
        \"description\": \"The unique identifier of a spacecraft\",
        \"type\": \"string\"
      },
      \"Spacecraft\": {
        \"type\": \"object\",
        \"required\": [
          \"id\",
          \"name\",
          \"type\"
        ],
        \"properties\": {
          \"id\": {
            \"$ref\": \"#/components/schemas/SpacecraftId\"
          },
          \"name\": {
            \"type\": \"string\"
          },
          \"type\": {
            \"type\": \"string\",
            \"enum\": [
              \"capsule\",
              \"probe\",
              \"satellite\",
              \"spaceplane\",
              \"station\"
            ]
          },
          \"description\": {
            \"type\": \"string\"
          }
        }
      },
      \"Error\": {
        \"type\": \"object\",
        \"required\": [
          \"message\"
        ],
        \"properties\": {
          \"message\": {
            \"description\": \"A human readable error message\",
            \"type\": \"string\"
          }
        }
      }
    },
    \"securitySchemes\": {
      \"ApiKey\": {
        \"type\": \"apiKey\",
        \"in\": \"header\",
        \"name\": \"X-Api-Key\"
      }
    }
  },
  \"security\": [
    {
      \"ApiKey\": []
    }
  ]
}",
        "type": "openapi3"
    } }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Request Body
const url = 'https://api.getpostman.com/security/api-validation';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"schema":{"language":"json","schema":"{\n  \"openapi\": \"3.0.0\",\n  \"servers\": [\n    {\n      \"url\": \"example.com\"\n    }\n  ],\n  \"info\": {\n    \"contact\": {\n      \"name\": \"Jon\"\n    },\n    \"version\": \"1.0.0\",\n    \"title\": \"Sample API\",\n    \"description\": \"Buy or rent spacecrafts\"\n  },\n  \"paths\": {\n    \"/spacecrafts/{spacecraftId}\": {\n      \"parameters\": [\n        {\n          \"name\": \"spacecraftId\",\n          \"description\": \"The unique identifier of the spacecraft\",\n          \"in\": \"path\",\n          \"required\": true,\n          \"schema\": {\n            \"$ref\": \"#/components/schemas/SpacecraftId\"\n          }\n        }\n      ],\n      \"get\": {\n        \"summary\": \"Read a spacecraft\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"The spacecraft corresponding to the provided `spacecraftId`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Spacecraft\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"description\": \"No spacecraft found for the provided `spacecraftId`\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          },\n          \"500\": {\n            \"description\": \"Unexpected error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"SpacecraftId\": {\n        \"description\": \"The unique identifier of a spacecraft\",\n        \"type\": \"string\"\n      },\n      \"Spacecraft\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"id\",\n          \"name\",\n          \"type\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"$ref\": \"#/components/schemas/SpacecraftId\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"type\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"capsule\",\n              \"probe\",\n              \"satellite\",\n              \"spaceplane\",\n              \"station\"\n            ]\n          },\n          \"description\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Error\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"message\"\n        ],\n        \"properties\": {\n          \"message\": {\n            \"description\": \"A human readable error message\",\n            \"type\": \"string\"\n          }\n        }\n      }\n    },\n    \"securitySchemes\": {\n      \"ApiKey\": {\n        \"type\": \"apiKey\",\n        \"in\": \"header\",\n        \"name\": \"X-Api-Key\"\n      }\n    }\n  },\n  \"security\": [\n    {\n      \"ApiKey\": []\n    }\n  ]\n}","type":"openapi3"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Request Body
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/security/api-validation"

	payload := strings.NewReader("{\n  \"schema\": {\n    \"language\": \"json\",\n    \"schema\": \"{\\n  \\\"openapi\\\": \\\"3.0.0\\\",\\n  \\\"servers\\\": [\\n    {\\n      \\\"url\\\": \\\"example.com\\\"\\n    }\\n  ],\\n  \\\"info\\\": {\\n    \\\"contact\\\": {\\n      \\\"name\\\": \\\"Jon\\\"\\n    },\\n    \\\"version\\\": \\\"1.0.0\\\",\\n    \\\"title\\\": \\\"Sample API\\\",\\n    \\\"description\\\": \\\"Buy or rent spacecrafts\\\"\\n  },\\n  \\\"paths\\\": {\\n    \\\"/spacecrafts/{spacecraftId}\\\": {\\n      \\\"parameters\\\": [\\n        {\\n          \\\"name\\\": \\\"spacecraftId\\\",\\n          \\\"description\\\": \\\"The unique identifier of the spacecraft\\\",\\n          \\\"in\\\": \\\"path\\\",\\n          \\\"required\\\": true,\\n          \\\"schema\\\": {\\n            \\\"$ref\\\": \\\"#/components/schemas/SpacecraftId\\\"\\n          }\\n        }\\n      ],\\n      \\\"get\\\": {\\n        \\\"summary\\\": \\\"Read a spacecraft\\\",\\n        \\\"responses\\\": {\\n          \\\"200\\\": {\\n            \\\"description\\\": \\\"The spacecraft corresponding to the provided `spacecraftId`\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Spacecraft\\\"\\n                }\\n              }\\n            }\\n          },\\n          \\\"404\\\": {\\n            \\\"description\\\": \\\"No spacecraft found for the provided `spacecraftId`\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Error\\\"\\n                }\\n              }\\n            }\\n          },\\n          \\\"500\\\": {\\n            \\\"description\\\": \\\"Unexpected error\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Error\\\"\\n                }\\n              }\\n            }\\n          }\\n        }\\n      }\\n    }\\n  },\\n  \\\"components\\\": {\\n    \\\"schemas\\\": {\\n      \\\"SpacecraftId\\\": {\\n        \\\"description\\\": \\\"The unique identifier of a spacecraft\\\",\\n        \\\"type\\\": \\\"string\\\"\\n      },\\n      \\\"Spacecraft\\\": {\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"required\\\": [\\n          \\\"id\\\",\\n          \\\"name\\\",\\n          \\\"type\\\"\\n        ],\\n        \\\"properties\\\": {\\n          \\\"id\\\": {\\n            \\\"$ref\\\": \\\"#/components/schemas/SpacecraftId\\\"\\n          },\\n          \\\"name\\\": {\\n            \\\"type\\\": \\\"string\\\"\\n          },\\n          \\\"type\\\": {\\n            \\\"type\\\": \\\"string\\\",\\n            \\\"enum\\\": [\\n              \\\"capsule\\\",\\n              \\\"probe\\\",\\n              \\\"satellite\\\",\\n              \\\"spaceplane\\\",\\n              \\\"station\\\"\\n            ]\\n          },\\n          \\\"description\\\": {\\n            \\\"type\\\": \\\"string\\\"\\n          }\\n        }\\n      },\\n      \\\"Error\\\": {\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"required\\\": [\\n          \\\"message\\\"\\n        ],\\n        \\\"properties\\\": {\\n          \\\"message\\\": {\\n            \\\"description\\\": \\\"A human readable error message\\\",\\n            \\\"type\\\": \\\"string\\\"\\n          }\\n        }\\n      }\\n    },\\n    \\\"securitySchemes\\\": {\\n      \\\"ApiKey\\\": {\\n        \\\"type\\\": \\\"apiKey\\\",\\n        \\\"in\\\": \\\"header\\\",\\n        \\\"name\\\": \\\"X-Api-Key\\\"\\n      }\\n    }\\n  },\\n  \\\"security\\\": [\\n    {\\n      \\\"ApiKey\\\": []\\n    }\\n  ]\\n}\",\n    \"type\": \"openapi3\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Request Body
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/security/api-validation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"schema\": {\n    \"language\": \"json\",\n    \"schema\": \"{\\n  \\\"openapi\\\": \\\"3.0.0\\\",\\n  \\\"servers\\\": [\\n    {\\n      \\\"url\\\": \\\"example.com\\\"\\n    }\\n  ],\\n  \\\"info\\\": {\\n    \\\"contact\\\": {\\n      \\\"name\\\": \\\"Jon\\\"\\n    },\\n    \\\"version\\\": \\\"1.0.0\\\",\\n    \\\"title\\\": \\\"Sample API\\\",\\n    \\\"description\\\": \\\"Buy or rent spacecrafts\\\"\\n  },\\n  \\\"paths\\\": {\\n    \\\"/spacecrafts/{spacecraftId}\\\": {\\n      \\\"parameters\\\": [\\n        {\\n          \\\"name\\\": \\\"spacecraftId\\\",\\n          \\\"description\\\": \\\"The unique identifier of the spacecraft\\\",\\n          \\\"in\\\": \\\"path\\\",\\n          \\\"required\\\": true,\\n          \\\"schema\\\": {\\n            \\\"$ref\\\": \\\"#/components/schemas/SpacecraftId\\\"\\n          }\\n        }\\n      ],\\n      \\\"get\\\": {\\n        \\\"summary\\\": \\\"Read a spacecraft\\\",\\n        \\\"responses\\\": {\\n          \\\"200\\\": {\\n            \\\"description\\\": \\\"The spacecraft corresponding to the provided `spacecraftId`\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Spacecraft\\\"\\n                }\\n              }\\n            }\\n          },\\n          \\\"404\\\": {\\n            \\\"description\\\": \\\"No spacecraft found for the provided `spacecraftId`\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Error\\\"\\n                }\\n              }\\n            }\\n          },\\n          \\\"500\\\": {\\n            \\\"description\\\": \\\"Unexpected error\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Error\\\"\\n                }\\n              }\\n            }\\n          }\\n        }\\n      }\\n    }\\n  },\\n  \\\"components\\\": {\\n    \\\"schemas\\\": {\\n      \\\"SpacecraftId\\\": {\\n        \\\"description\\\": \\\"The unique identifier of a spacecraft\\\",\\n        \\\"type\\\": \\\"string\\\"\\n      },\\n      \\\"Spacecraft\\\": {\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"required\\\": [\\n          \\\"id\\\",\\n          \\\"name\\\",\\n          \\\"type\\\"\\n        ],\\n        \\\"properties\\\": {\\n          \\\"id\\\": {\\n            \\\"$ref\\\": \\\"#/components/schemas/SpacecraftId\\\"\\n          },\\n          \\\"name\\\": {\\n            \\\"type\\\": \\\"string\\\"\\n          },\\n          \\\"type\\\": {\\n            \\\"type\\\": \\\"string\\\",\\n            \\\"enum\\\": [\\n              \\\"capsule\\\",\\n              \\\"probe\\\",\\n              \\\"satellite\\\",\\n              \\\"spaceplane\\\",\\n              \\\"station\\\"\\n            ]\\n          },\\n          \\\"description\\\": {\\n            \\\"type\\\": \\\"string\\\"\\n          }\\n        }\\n      },\\n      \\\"Error\\\": {\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"required\\\": [\\n          \\\"message\\\"\\n        ],\\n        \\\"properties\\\": {\\n          \\\"message\\\": {\\n            \\\"description\\\": \\\"A human readable error message\\\",\\n            \\\"type\\\": \\\"string\\\"\\n          }\\n        }\\n      }\\n    },\\n    \\\"securitySchemes\\\": {\\n      \\\"ApiKey\\\": {\\n        \\\"type\\\": \\\"apiKey\\\",\\n        \\\"in\\\": \\\"header\\\",\\n        \\\"name\\\": \\\"X-Api-Key\\\"\\n      }\\n    }\\n  },\\n  \\\"security\\\": [\\n    {\\n      \\\"ApiKey\\\": []\\n    }\\n  ]\\n}\",\n    \"type\": \"openapi3\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Request Body
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/security/api-validation")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"schema\": {\n    \"language\": \"json\",\n    \"schema\": \"{\\n  \\\"openapi\\\": \\\"3.0.0\\\",\\n  \\\"servers\\\": [\\n    {\\n      \\\"url\\\": \\\"example.com\\\"\\n    }\\n  ],\\n  \\\"info\\\": {\\n    \\\"contact\\\": {\\n      \\\"name\\\": \\\"Jon\\\"\\n    },\\n    \\\"version\\\": \\\"1.0.0\\\",\\n    \\\"title\\\": \\\"Sample API\\\",\\n    \\\"description\\\": \\\"Buy or rent spacecrafts\\\"\\n  },\\n  \\\"paths\\\": {\\n    \\\"/spacecrafts/{spacecraftId}\\\": {\\n      \\\"parameters\\\": [\\n        {\\n          \\\"name\\\": \\\"spacecraftId\\\",\\n          \\\"description\\\": \\\"The unique identifier of the spacecraft\\\",\\n          \\\"in\\\": \\\"path\\\",\\n          \\\"required\\\": true,\\n          \\\"schema\\\": {\\n            \\\"$ref\\\": \\\"#/components/schemas/SpacecraftId\\\"\\n          }\\n        }\\n      ],\\n      \\\"get\\\": {\\n        \\\"summary\\\": \\\"Read a spacecraft\\\",\\n        \\\"responses\\\": {\\n          \\\"200\\\": {\\n            \\\"description\\\": \\\"The spacecraft corresponding to the provided `spacecraftId`\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Spacecraft\\\"\\n                }\\n              }\\n            }\\n          },\\n          \\\"404\\\": {\\n            \\\"description\\\": \\\"No spacecraft found for the provided `spacecraftId`\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Error\\\"\\n                }\\n              }\\n            }\\n          },\\n          \\\"500\\\": {\\n            \\\"description\\\": \\\"Unexpected error\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Error\\\"\\n                }\\n              }\\n            }\\n          }\\n        }\\n      }\\n    }\\n  },\\n  \\\"components\\\": {\\n    \\\"schemas\\\": {\\n      \\\"SpacecraftId\\\": {\\n        \\\"description\\\": \\\"The unique identifier of a spacecraft\\\",\\n        \\\"type\\\": \\\"string\\\"\\n      },\\n      \\\"Spacecraft\\\": {\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"required\\\": [\\n          \\\"id\\\",\\n          \\\"name\\\",\\n          \\\"type\\\"\\n        ],\\n        \\\"properties\\\": {\\n          \\\"id\\\": {\\n            \\\"$ref\\\": \\\"#/components/schemas/SpacecraftId\\\"\\n          },\\n          \\\"name\\\": {\\n            \\\"type\\\": \\\"string\\\"\\n          },\\n          \\\"type\\\": {\\n            \\\"type\\\": \\\"string\\\",\\n            \\\"enum\\\": [\\n              \\\"capsule\\\",\\n              \\\"probe\\\",\\n              \\\"satellite\\\",\\n              \\\"spaceplane\\\",\\n              \\\"station\\\"\\n            ]\\n          },\\n          \\\"description\\\": {\\n            \\\"type\\\": \\\"string\\\"\\n          }\\n        }\\n      },\\n      \\\"Error\\\": {\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"required\\\": [\\n          \\\"message\\\"\\n        ],\\n        \\\"properties\\\": {\\n          \\\"message\\\": {\\n            \\\"description\\\": \\\"A human readable error message\\\",\\n            \\\"type\\\": \\\"string\\\"\\n          }\\n        }\\n      }\\n    },\\n    \\\"securitySchemes\\\": {\\n      \\\"ApiKey\\\": {\\n        \\\"type\\\": \\\"apiKey\\\",\\n        \\\"in\\\": \\\"header\\\",\\n        \\\"name\\\": \\\"X-Api-Key\\\"\\n      }\\n    }\\n  },\\n  \\\"security\\\": [\\n    {\\n      \\\"ApiKey\\\": []\\n    }\\n  ]\\n}\",\n    \"type\": \"openapi3\"\n  }\n}")
  .asString();
```

```php Request Body
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/security/api-validation', [
  'body' => '{
  "schema": {
    "language": "json",
    "schema": "{\\n  \\"openapi\\": \\"3.0.0\\",\\n  \\"servers\\": [\\n    {\\n      \\"url\\": \\"example.com\\"\\n    }\\n  ],\\n  \\"info\\": {\\n    \\"contact\\": {\\n      \\"name\\": \\"Jon\\"\\n    },\\n    \\"version\\": \\"1.0.0\\",\\n    \\"title\\": \\"Sample API\\",\\n    \\"description\\": \\"Buy or rent spacecrafts\\"\\n  },\\n  \\"paths\\": {\\n    \\"/spacecrafts/{spacecraftId}\\": {\\n      \\"parameters\\": [\\n        {\\n          \\"name\\": \\"spacecraftId\\",\\n          \\"description\\": \\"The unique identifier of the spacecraft\\",\\n          \\"in\\": \\"path\\",\\n          \\"required\\": true,\\n          \\"schema\\": {\\n            \\"$ref\\": \\"#/components/schemas/SpacecraftId\\"\\n          }\\n        }\\n      ],\\n      \\"get\\": {\\n        \\"summary\\": \\"Read a spacecraft\\",\\n        \\"responses\\": {\\n          \\"200\\": {\\n            \\"description\\": \\"The spacecraft corresponding to the provided `spacecraftId`\\",\\n            \\"content\\": {\\n              \\"application/json\\": {\\n                \\"schema\\": {\\n                  \\"$ref\\": \\"#/components/schemas/Spacecraft\\"\\n                }\\n              }\\n            }\\n          },\\n          \\"404\\": {\\n            \\"description\\": \\"No spacecraft found for the provided `spacecraftId`\\",\\n            \\"content\\": {\\n              \\"application/json\\": {\\n                \\"schema\\": {\\n                  \\"$ref\\": \\"#/components/schemas/Error\\"\\n                }\\n              }\\n            }\\n          },\\n          \\"500\\": {\\n            \\"description\\": \\"Unexpected error\\",\\n            \\"content\\": {\\n              \\"application/json\\": {\\n                \\"schema\\": {\\n                  \\"$ref\\": \\"#/components/schemas/Error\\"\\n                }\\n              }\\n            }\\n          }\\n        }\\n      }\\n    }\\n  },\\n  \\"components\\": {\\n    \\"schemas\\": {\\n      \\"SpacecraftId\\": {\\n        \\"description\\": \\"The unique identifier of a spacecraft\\",\\n        \\"type\\": \\"string\\"\\n      },\\n      \\"Spacecraft\\": {\\n        \\"type\\": \\"object\\",\\n        \\"required\\": [\\n          \\"id\\",\\n          \\"name\\",\\n          \\"type\\"\\n        ],\\n        \\"properties\\": {\\n          \\"id\\": {\\n            \\"$ref\\": \\"#/components/schemas/SpacecraftId\\"\\n          },\\n          \\"name\\": {\\n            \\"type\\": \\"string\\"\\n          },\\n          \\"type\\": {\\n            \\"type\\": \\"string\\",\\n            \\"enum\\": [\\n              \\"capsule\\",\\n              \\"probe\\",\\n              \\"satellite\\",\\n              \\"spaceplane\\",\\n              \\"station\\"\\n            ]\\n          },\\n          \\"description\\": {\\n            \\"type\\": \\"string\\"\\n          }\\n        }\\n      },\\n      \\"Error\\": {\\n        \\"type\\": \\"object\\",\\n        \\"required\\": [\\n          \\"message\\"\\n        ],\\n        \\"properties\\": {\\n          \\"message\\": {\\n            \\"description\\": \\"A human readable error message\\",\\n            \\"type\\": \\"string\\"\\n          }\\n        }\\n      }\\n    },\\n    \\"securitySchemes\\": {\\n      \\"ApiKey\\": {\\n        \\"type\\": \\"apiKey\\",\\n        \\"in\\": \\"header\\",\\n        \\"name\\": \\"X-Api-Key\\"\\n      }\\n    }\\n  },\\n  \\"security\\": [\\n    {\\n      \\"ApiKey\\": []\\n    }\\n  ]\\n}",
    "type": "openapi3"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Request Body
using RestSharp;

var client = new RestClient("https://api.getpostman.com/security/api-validation");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"schema\": {\n    \"language\": \"json\",\n    \"schema\": \"{\\n  \\\"openapi\\\": \\\"3.0.0\\\",\\n  \\\"servers\\\": [\\n    {\\n      \\\"url\\\": \\\"example.com\\\"\\n    }\\n  ],\\n  \\\"info\\\": {\\n    \\\"contact\\\": {\\n      \\\"name\\\": \\\"Jon\\\"\\n    },\\n    \\\"version\\\": \\\"1.0.0\\\",\\n    \\\"title\\\": \\\"Sample API\\\",\\n    \\\"description\\\": \\\"Buy or rent spacecrafts\\\"\\n  },\\n  \\\"paths\\\": {\\n    \\\"/spacecrafts/{spacecraftId}\\\": {\\n      \\\"parameters\\\": [\\n        {\\n          \\\"name\\\": \\\"spacecraftId\\\",\\n          \\\"description\\\": \\\"The unique identifier of the spacecraft\\\",\\n          \\\"in\\\": \\\"path\\\",\\n          \\\"required\\\": true,\\n          \\\"schema\\\": {\\n            \\\"$ref\\\": \\\"#/components/schemas/SpacecraftId\\\"\\n          }\\n        }\\n      ],\\n      \\\"get\\\": {\\n        \\\"summary\\\": \\\"Read a spacecraft\\\",\\n        \\\"responses\\\": {\\n          \\\"200\\\": {\\n            \\\"description\\\": \\\"The spacecraft corresponding to the provided `spacecraftId`\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Spacecraft\\\"\\n                }\\n              }\\n            }\\n          },\\n          \\\"404\\\": {\\n            \\\"description\\\": \\\"No spacecraft found for the provided `spacecraftId`\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Error\\\"\\n                }\\n              }\\n            }\\n          },\\n          \\\"500\\\": {\\n            \\\"description\\\": \\\"Unexpected error\\\",\\n            \\\"content\\\": {\\n              \\\"application/json\\\": {\\n                \\\"schema\\\": {\\n                  \\\"$ref\\\": \\\"#/components/schemas/Error\\\"\\n                }\\n              }\\n            }\\n          }\\n        }\\n      }\\n    }\\n  },\\n  \\\"components\\\": {\\n    \\\"schemas\\\": {\\n      \\\"SpacecraftId\\\": {\\n        \\\"description\\\": \\\"The unique identifier of a spacecraft\\\",\\n        \\\"type\\\": \\\"string\\\"\\n      },\\n      \\\"Spacecraft\\\": {\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"required\\\": [\\n          \\\"id\\\",\\n          \\\"name\\\",\\n          \\\"type\\\"\\n        ],\\n        \\\"properties\\\": {\\n          \\\"id\\\": {\\n            \\\"$ref\\\": \\\"#/components/schemas/SpacecraftId\\\"\\n          },\\n          \\\"name\\\": {\\n            \\\"type\\\": \\\"string\\\"\\n          },\\n          \\\"type\\\": {\\n            \\\"type\\\": \\\"string\\\",\\n            \\\"enum\\\": [\\n              \\\"capsule\\\",\\n              \\\"probe\\\",\\n              \\\"satellite\\\",\\n              \\\"spaceplane\\\",\\n              \\\"station\\\"\\n            ]\\n          },\\n          \\\"description\\\": {\\n            \\\"type\\\": \\\"string\\\"\\n          }\\n        }\\n      },\\n      \\\"Error\\\": {\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"required\\\": [\\n          \\\"message\\\"\\n        ],\\n        \\\"properties\\\": {\\n          \\\"message\\\": {\\n            \\\"description\\\": \\\"A human readable error message\\\",\\n            \\\"type\\\": \\\"string\\\"\\n          }\\n        }\\n      }\\n    },\\n    \\\"securitySchemes\\\": {\\n      \\\"ApiKey\\\": {\\n        \\\"type\\\": \\\"apiKey\\\",\\n        \\\"in\\\": \\\"header\\\",\\n        \\\"name\\\": \\\"X-Api-Key\\\"\\n      }\\n    }\\n  },\\n  \\\"security\\\": [\\n    {\\n      \\\"ApiKey\\\": []\\n    }\\n  ]\\n}\",\n    \"type\": \"openapi3\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Request Body
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["schema": [
    "language": "json",
    "schema": "{
  \"openapi\": \"3.0.0\",
  \"servers\": [
    {
      \"url\": \"example.com\"
    }
  ],
  \"info\": {
    \"contact\": {
      \"name\": \"Jon\"
    },
    \"version\": \"1.0.0\",
    \"title\": \"Sample API\",
    \"description\": \"Buy or rent spacecrafts\"
  },
  \"paths\": {
    \"/spacecrafts/{spacecraftId}\": {
      \"parameters\": [
        {
          \"name\": \"spacecraftId\",
          \"description\": \"The unique identifier of the spacecraft\",
          \"in\": \"path\",
          \"required\": true,
          \"schema\": {
            \"$ref\": \"#/components/schemas/SpacecraftId\"
          }
        }
      ],
      \"get\": {
        \"summary\": \"Read a spacecraft\",
        \"responses\": {
          \"200\": {
            \"description\": \"The spacecraft corresponding to the provided `spacecraftId`\",
            \"content\": {
              \"application/json\": {
                \"schema\": {
                  \"$ref\": \"#/components/schemas/Spacecraft\"
                }
              }
            }
          },
          \"404\": {
            \"description\": \"No spacecraft found for the provided `spacecraftId`\",
            \"content\": {
              \"application/json\": {
                \"schema\": {
                  \"$ref\": \"#/components/schemas/Error\"
                }
              }
            }
          },
          \"500\": {
            \"description\": \"Unexpected error\",
            \"content\": {
              \"application/json\": {
                \"schema\": {
                  \"$ref\": \"#/components/schemas/Error\"
                }
              }
            }
          }
        }
      }
    }
  },
  \"components\": {
    \"schemas\": {
      \"SpacecraftId\": {
        \"description\": \"The unique identifier of a spacecraft\",
        \"type\": \"string\"
      },
      \"Spacecraft\": {
        \"type\": \"object\",
        \"required\": [
          \"id\",
          \"name\",
          \"type\"
        ],
        \"properties\": {
          \"id\": {
            \"$ref\": \"#/components/schemas/SpacecraftId\"
          },
          \"name\": {
            \"type\": \"string\"
          },
          \"type\": {
            \"type\": \"string\",
            \"enum\": [
              \"capsule\",
              \"probe\",
              \"satellite\",
              \"spaceplane\",
              \"station\"
            ]
          },
          \"description\": {
            \"type\": \"string\"
          }
        }
      },
      \"Error\": {
        \"type\": \"object\",
        \"required\": [
          \"message\"
        ],
        \"properties\": {
          \"message\": {
            \"description\": \"A human readable error message\",
            \"type\": \"string\"
          }
        }
      }
    },
    \"securitySchemes\": {
      \"ApiKey\": {
        \"type\": \"apiKey\",
        \"in\": \"header\",
        \"name\": \"X-Api-Key\"
      }
    }
  },
  \"security\": [
    {
      \"ApiKey\": []
    }
  ]
}",
    "type": "openapi3"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/security/api-validation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```