
# OpenAPI Specification

Digitoo API supports the OpenAPI specification standard as a JSON object. It is a self-descriptive endpoint that enables developers to explore the API contract easily.

[What is OpenAPI specification?](https://swagger.io/specification/)
## URL

```http
GET https://api.digitoo.ai/api-v2-json
```

<OpenPlaygroundButton
  server="https://api.digitoo.ai"
  url="/api-v2-json"
  method="GET"
/>

## Response

The endpoint returns the OpenAPI specification. For example:

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "My API",
    "version": "1.0.0",
    "description": "API documentation for My API"
  },
  "paths": { ... },
  "components": { ... }
}
```

## Helper Usages

### Using Postman

1. **Importing the OpenAPI Spec:**
   - Open Postman.
   - Click on **File > Import**.
   - Choose the OpenAPI specification file you downloaded from `/api-v2-json`

2. **Generating Requests:**
   - Postman will auto-generate endpoints and examples from the specification.
   - This allows you to quickly test various endpoints without manually crafting requests.

### Code Generation

Many code generation tools can use the OpenAPI specification to create client libraries automatically. Some popular options include:
  
-  **Swagger Codegen:** Generates client libraries, server stubs, and API documentation.
-  **OpenAPI Generator:** Offers a broad range of languages and customization options.

#### Example (Using OpenAPI Generator):

```bash
openapi-generator-cli generate -i https://api.digitoo.ai/api-v2-json -g javascript -o ./client
```

This command downloads the OpenAPI specification from the provided URL and generates a JavaScript client in the `./client` directory.

## Additional Resources

-  [Swagger UI](https://swagger.io/tools/swagger-ui/)
-  [OpenAPI Specification](https://swagger.io/specification/)
-  [Postman Documentation](https://learning.postman.com/)
-  [Hey API](https://heyapi.dev/)

This endpoint is designed to simplify API exploration and integration. Whether you use Postman, code generation tools, or other API testing tools, following these guidelines will help you make the most of your API specification.
