# Postman Sandbox API reference Postman provides JavaScript APIs with the `pm` object, enabling you to test and access request and response data in your test scripts run in the [Postman Sandbox](https://github.com/postmanlabs/postman-sandbox). You can use the `pm` object to access request and response details, write assertions, and access and use variables. You can also use the `pm` object to send HTTP requests and other meta information in the Postman Sandbox. ## Use scripts to access cookies Use the `pm.cookies` methods in scripts to access and manipulate cookies. To learn more, see [Access cookies in Postman scripts](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-cookies/). ## Use scripts with requests and responses Reference requests and responses with the `pm.request` and `pm.response` objects in scripts. Streaming protocols also return a `pm.message` object. The `pm.info` object contains meta info related to the request and script Use the `pm.sendRequest` method in your scripts to send requests in Postman. To learn more, see [Reference Postman requests in scripts](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-request/), [Use scripts to send requests in Postman](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-send-request/), [Reference request metadata in scripts](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-info/) and [Reference message data in scripts](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-message/). ## Use scripts with collections The `pm.execution` object provides information and context about requests and their responses during a [collection run](/docs/collections/running-collections/intro-to-collection-runs/), such as sending requests or which request is running, its position in a collection, and run-related metadata. To learn more, see [Use scripts in collection runs](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-execution/). ## Script variables Access and manipulate different [variable types](/docs/sending-requests/variables/variables/) and scopes in your scripts. To learn more, see [Reference variables in Postman scripts](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-variables/). ## Use scripts to visualize data The `pm.visualizer` object enables you to visually represent your API's request responses with the [Postman Visualizer](/docs/sending-requests/response-data/visualizer/). To learn more, see [Script Postman visualizations](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-visualizer/). ## Manage Postman Vault with scripts Access and manipulate [vault secrets](/docs/sending-requests/postman-vault/postman-vault-secrets/) in your scripts with the `pm.vault` methods. To learn more, see [Reference vault secrets in Postman scripts](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-vault/). ## Test assertions with scripts Use the `pm.test` and `pm.expect` methods in your scripts to add test specifications and assertions. To learn more, see [Writing tests and assertions in scripts](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-test-expect/). ## Import packages into your scripts The `pm.require` method enables you to import packages from your team's [Package Library](/docs/tests-and-scripts/write-scripts/packages/package-library/) or [external package registries](/docs/tests-and-scripts/write-scripts/packages/external-package-registries/) inside scripts in HTTP, gRPC, and GraphQL requests. To learn more, see [Import packages into your scripts](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-require/).