> For the complete documentation index, see [llms.txt](https://docs.verygoodsecurity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verygoodsecurity.com/cmp/developer-resources/api.md).

# API Reference

**Sandbox server:** `https://sandbox.vgsapi.com`

A sandbox environment server used for integration and testing purposes. Uses network sandboxes in addition to mocked data sources.

[**Card Management**](/cmp/platform/overview.md) **YAML Files for Sandbox Environment:**

* Download [card-management-api-dev ](https://openapi.gitbook.com/o/hcowjO8ckQ1K5fm3NPZH/spec/card-management-api-dev.yaml)

\
**Live server:** `https://vgsapi.com`

Live environment server used for production workloads.&#x20;

[**Card Management**](/cmp/platform/overview.md) **YAML Files for Live Environment:**

* Download [card-management-api](https://openapi.gitbook.com/o/hcowjO8ckQ1K5fm3NPZH/spec/card-management-api.yaml)<br>

**API Basics**

* All 4XX errors can be retried with appropriate changes made to the request to correct the error.
* 502/503/504s can be retried at a later time, as these are transient errors.
* 500s should not be retried unless advised by VGS, as these may require additional correction.

|     |                        |                                                                                                                                                                                                 |
| --- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400 | bad-request            | There is a problem with your request. This error will potentially appear for issues with the formatting or content of your request that are not clearly identifiable by the server.             |
| 401 | unauthorized           | Your request lacks valid authentication credentials.                                                                                                                                            |
| 403 | forbidden              | The credentials provided do not possess the correct privileges to complete this action.                                                                                                         |
| 415 | unsupported-media-type | Your request is not using the proper media type. Requests to this API use the JSON:API media type ('application/vnd.api+json') in the Content-Type header.                                      |
| 422 | missing-required-field | A field which is required for a valid request is missing.                                                                                                                                       |
| 422 | validation-failed      | A field with specific validations is not valid.                                                                                                                                                 |
| 422 | failed-dependency      | The operation cannot be completed due to a dependent resource not being in the correct state. Used when attempting to interact with a Network Token that is missing or not in the ACTIVE state. |
| 500 | server-error           | An error occurred. This problem is not addressable by changing the request, and the request should not be reattempted.                                                                          |
| 502 | bad-gateway            | This error will not have the same structure as other errors, as it will be returned before the request has been processed by the application.                                                   |
| 503 | service-unavailable    | This error will not have the same structure as other errors, as it will be returned before the request has been processed by the application.                                                   |
| 504 | gateway-timeout        | This error will not have the same structure as other errors, as it will be returned before the request has been processed by the application.                                                   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verygoodsecurity.com/cmp/developer-resources/api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
